<?php
declare(strict_types=1);
namespace App\Common\pay;

use Hyperf\Di\Annotation\Inject;
use App\Common\Common;
use App\Common\Guzzle;
use Psr\Log\LoggerInterface;
use function Hyperf\Config\config;
use function Hyperf\Support\env;
use  App\Common\Curl;
class Pay{


    #[Inject]
    protected LoggerInterface $logger; //存储日志

    #[Inject]
    protected Common $Common;
    #[Inject]
    protected Guzzle $guzzle;

    //rr_pay
    private string $rrpay_url        = "https://top.adkjk.in/rpay-api/order/submit";                 //下单地址

    // private string $rrpay_merchantNo = "999"; //测试
    private string $rrpay_merchantNo = "1103"; //正式
    private string $rrpay_notifyUrl  = "rrpayNotify";  //回调地址
    // private string $rrpay_Key        = "abc#123!";//测试
    private string $rrpay_Key        = "7YzlqZ6xhpkhj5B0";//正式



    //ser_pay
    private string $serpay_url = "https://api.metagopayments.com/cashier/pay.ac";//下单地址
    private string $serpay_key = "353FD9914A2C8C619FE6F2E1B8CD45E0";//商户密钥的值
    private string $serpay_orgNo = "8240800048";//机构号
    private string $serpay_mchid = "24082600000048";//商户编码
    private string $serpay_backUrl = "serpayNotify";//回调地址




    //sertwo_pay 唤醒
    private string $sertwopay_url = "https://api.metagopayments.com/cashier/pay.ac";//下单地址
    private string $sertwopay_key = "C32FA37CC0421E6231E6E7EDC8C26C5F";//商户密钥的值
    private string $sertwopay_orgNo = "8241100128";//机构号
    private string $sertwopay_mchid = "24110100000126";//商户编码
    private string $sertwopay_backUrl = "serpayNotify";//回调地址



    //tm_pay
    private string $tmpay_url = "https://beespay.store/gateway/v1/pay/create";          //下单地址
    // private string $tmpay_merchantNo       = "1M6S80Q0T1";                                   //商户号测试
    private string $tmpay_merchantNo       = "1HHF923W30";                                   //商户号正式
    // private string $tmpay_appid   = "M1E3123051824F36ABFBB75250B0A0DC";  //app_id 测试环境
    private string $tmpay_appid   = "37B6BD129BE9447E9070CFF6D69E956F";  //app_id 正式环境

//    private string $tmpay_Key    = 'KM@8gfWwK0WkZ1#!ux6svzV1ADV:Ftz!*9%A%yW@VZjG=lYMxyIjTB0fw0u#cz0l8RX7ir1#J7fjwop%XJ%f:cZUr$:g041sx^Se3f$X*?tNv3*1DFbT7%R39VTynS8D';//测试
    private string $tmpay_Key    = 'KZd!m7L?eL:A7lCH#vQHOCGC:AAUMSJ:$zX^gOREKpNuDWyl^h*ZU?LWOrbBYK7n00avVwwA=hAe~ZOCW7ll8gCY!l@5sSwRr9vQH8Af&Xd5NH5J:VNsgqK_bW!k1fdD'; //正式
    private string $tmpay_notifyUrl   = "tmpayNotify";


    //waka_pay
    private string $wakapay_url = "https://wkpluss.com/gateway/";          //下单地址
    private string $wakapay_merchantNo       = "8890439";                        //商户号
    private string $wakapay_Key    = "8eba3208c2b6070cbf431013bea8fd14";  //商户秘钥
    private string $wakapay_notifyUrl   = "wakapayNotify";


    //fun_pay
    private string $funpay_url = "https://api.stimulatepay.com/api/payment/v1/create";          //下单地址
    private string $funpay_merchantNo       = "pcI98HftC1SLR8qj";                        //商户号
    private string $funpayKey    = "5e48c9b9170f493185f8c9a96c45b487";  //商户秘钥
    private string $funpay_notifyUrl   = "funpayNotify";



    //go_pay
    private string $gopay_url = "https://rummylotus.online/api/recharge/create";          //下单地址
    private string $gopay_merchantNo       = "2023100015";                        //商户号
    private string $gopayKey    = "d65cc4596f20499ea4af91a998321f5c";  //商户秘钥
    private string $gopay_notifyUrl   = "gopayNotify";


    //eanishop_pay
    // private string $eanishoppay_url = "https://gateway-sandbox.eanishop.com/pg/v2/payment/create";          //测试
    private string $eanishoppay_url = "https://gateway.eanishop.com/pg/v2/payment/create";          //正式
    private string $eanishoppayAppId    = "4f630c1ee9e243ef840303438c21da0f";
    private string $eanishoppayAppSecret    = "6725bd87b3bc43419e2ff4d616d4a2da";
    private string $eanishoppay_notifyUrl   = "eanishoppayNotify";



    //24hrpay

    private string $hr24pay_url = "https://pay.24hrpay.vip/api/unified/collection/create";          //正式
    private string $hr24pay_mchId    = "50000567"; //正式
    private string $hr24pay_appKey    = "CABS32R2LZEGAQWRUMM1N7OLPHJ512N1Z9EL7BHYT1ZBQLHYNE1SXW8WF0LBO0XYFQLOT1VLHK0YUWO4T89G8QJC12SL8UCGSOKPAXZZFJTLZWVJ82K73UR6EUKLJSPK"; //正式
    private string $hr24pay_notifyUrl   = "hr24payNotify";



    //ai_pay
    private string $aipay_url = "https://aipay.cool/gateway/";          //下单地址
    private string $aipay_merchantNo       = "862360";                        //商户号
    private string $aipay_Key    = "517faa1fd5cbd6b13541b90f97fe9625";  //商户秘钥
    private string $aipay_notifyUrl   = "aipayNotify";




    //x_pay
    private string $xpay_url = "https://pay.xpay.wang/api/pay/unifiedOrder";                                   //下单地址
    private string $xpay_merchantNo       = "M1669706824";                                   //下单地址-gesang
    private string $xpay_appId       = "6385b4487bd27c0dd2ccb6fb";                                   //下单地址-gesang
    private string $xpay_notifyUrl   = "xpayNotify";               //回调地址
    private string $xpay_Key    = "Tc5YVPZKwck6esXi697jxMDTjvc7ojaWOluTFaiq4kvuO7rmvLIAmSqDQCanXu5NuItfanr4PPEs4bNmkXqTsRMiPiz6vfJI2JNj1AEDU7guTdsQ9IQ4fmFVRfJIoOSz";



    //lets_pay
    private string $letspay_url = "http://api.letspayfast.com/apipay";                                   //下单地址
    private string $letspay_mchId       = "722931450180";
    private string $letspay_notifyUrl   = "letspayNotify";               //回调地址
    private string $letspay_Key    = "YFYCHSXAY6DPNS5A0NUYGDD66NSUFXFCUIPCLTXWNQJF0HG5V5IMQKC7AIC071HXZZERDBOBLPIOQUUROFA2AIQKUZDWJTP3N06ZKJPXWJSBJRFORFLGDY5MP3U7VPHE";



    //letstwo_pay  lets_pay原生
    private string $letstwopay_url = "http://api.letspayfast.com/apipay";                                   //下单地址
    private string $letstwopay_mchId       = "723450269337";
    private string $letstwopay_notifyUrl   = "letspayNotify";             //回调地址
    private string $letstwopay_Key    = "IZUGUT9LZR6LQIUGV6HMHJZUPREJTNWAZ8R99SJQNFCUBOUYKEK0LZUWWJ6GNIE6ENZNTKX9DKCYBRRJ0VJWXER9S1OVEVGLKWINIMRCL1HEHUJPKJ5IX0ZGX59SE0TL";

    //dragon_pay
    private string $dragonpay_url = "https://dragonpayment.net/api/inr/recharge";                                   //下单地址
    private string $dragonpay_appKey       = "53E64C7EFACD3F30D1";
    private string $dragonpay_notifyUrl   = "dragonpayNotify";             //回调地址
    private string $dragonpay_secret    = "81d51489d6bbe4045e3c9b6d6e6067c6068e6e4b";

    //ant_pay
    private string $antpay_url = "https://api.antpay.life/pay";                                   //下单地址
    private string $antpay_merchant_code       = "AM1723630965609";
    private string $antpay_notifyUrl   = "antpayNotify";             //回调地址
    private string $antpay_key    = "43e795347e032fa4d439706ac01309f5";


    //ff_pay
    private string $ffpay_url = "https://api.wepayglobal.com/pay/web";                                   //下单地址
    private string $ffpay_mchId      = "100777805";//正式
    private string $ffpay_notifyUrl   = "ffpayNotify";             //回调地址
    private string $ffpay_key    = "874a2e43f7e54d799846667d6abe2666";//正式



    //cow_pay
    private string $cowpay_url = "https://pay365.cowpay.in/pay";                                   //下单地址
    private string $cowpay_mchId      = "1723714607199";
    private string $cowpay_notifyUrl   = "cowpayNotify";             //回调地址
    private string $cowpay_key    = "9c8303152d19b5aac5336bcd5f16fc34";


    //cowtwo_pay  //原生
    private string $cowtwopay_url = "https://pay365.cowpay.in/pay";                                   //下单地址
    private string $cowtwopay_mchId      = "1741771173009";

    private string $cowtwopay_notifyUrl   = "cowpayNotify";             //回调地址
    private string $cowtwopay_key    = "1fe7fe1646e98684efd6a3fb3087db98";



    //wdd_pay
    private string $wddpay_url = "https://www.wddeasypay.com/orders/orders";                                   //下单地址
    private string $wddpay_mchId      = "10238";
    private string $wddpay_notifyUrl   = "wddpayNotify";             //回调地址
    private string $wddpay_key    = "sLwEMOQjDKorywnP";



    //timi_pay
    private string $timipay_url = "https://www.timipay.shop/lh_pay/pay";                                   //下单地址
    private string $timipay_mchId      = "529098346";
    private string $timipay_notifyUrl   = "timipayNotify";             //回调地址
    private string $timipay_key    = "56c773f8e761b72c722e1ff1991d2547";



    //newfun_pay
    private string $newfunpay_url = "https://api.funpay.tv/orderPay";                                   //下单地址
    private string $newfunpay_mchId      = "1059"; //正式
    private string $newfunpay_notifyUrl   = "newfunpayNotify";             //回调地址
    private string $newfunpay_key    = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJMRc60xlWTJmdtm6jFkbk2LNiax2d/bFWw46oXydTuR4HXU2eX0QVpClogKn2CdkA4vwmYt9pc8POwEfwBqq3jMz8Si/5i6YIskdmnktiNa6D/lB0K22CFWQxo+ks/BH7k+pas2+IyL6KO2EHsSwG/67jrjnB3XTLqIndvYNV+zAgMBAAECgYAabL7Tpj6ZEu4tsWKwCEMXdMWAk2E56zQAs4NUGPn+f5oMofea7VXWwXMps3rqkbUCD4vG70hI6T5rC+3D5ea0Mpk5YFd2HW8LEyS2VBAcADkfLYRf6KIChFQ3fvTiqxP1qmVyO7mDlxkuLgMOPSX5kp6JL/hsf3esS+gNcvqFLQJBALvxkkh/JBT0MRMp9zb33ma0Yl/gqqvU9ujqmVzgEknKpNFF2kVpWBdJ56ORTEwgR8BuXisYYfQdsfCGUy/seh8CQQDIUraK4H5HgLYRQoCkBBNFSlMvZV60FicEd3RHjY0QDa4fJrD+LJMFt9loAZXBC226uxYXtjyc1w6EPFT9z4/tAkAzPa2wblmcDOfEXdC0/+d3AP9BPLPLnYikADJIDB9wVvuQwwa7nfkSgGfTRK4Uo0hswqqR/VfXgrEc7sKHcmXpAkBkFi9uI8v0HbLZ3Mg5KnAWZpQ5UgSHJapI6QYH2glow+0DU2mLFOpAKSNOe7w+v18LtP3MyxhtpGV0XFB6n4HhAkEArnUMYgOQHWJHqNrxoDuzYA3alfpHe8/S7VHZ3oPB3FAmpLQDx81C3+7q5MOlHASTU8qvMNEirJeAW3wuyhteaw==";//正式




    //simply_pay
    private string $simplypay_url = "https://api.simplypay.vip/api/v2/payment/order/create";                                   //下单地址
    private string $simplypay_appId      = "3846f553e7a1230c18308af654b688bc";
    private string $simplypay_notifyUrl   = "simplypayNotify";             //回调地址
    private string $simplypay_key    = "158aa68d9454f18962e14c7a541e73a9";



    //simplytwo_pay
    private string $simplytwopay_url = "https://api.simplypay.vip/api/v2/payment/order/create";                                   //下单地址
    private string $simplytwopay_appId      = "7184076527b71034f6a7bdf437c2acf0";
    private string $simplytwopay_notifyUrl   = "simplypayNotify";             //回调地址
    private string $simplytwopay_key    = "8fac2bd53e50c19c4ad9e1d7a030a3a6";



    //lq_pay
    private string $lqpay_url = "http://lqpay.txzfpay.top/sys/apple/api/collect";                                   //下单地址
    private string $lqpay_deptId      = "1710169284135714818";  //机构号
    private string $lqpay_mchId      = "22000023";
    private string $lqpay_notifyUrl   = "lqpayNotify";             //回调地址
    private string $lqpay_key    = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAN231QFbn8xmA83LecawDmnoHPD4asBG79dJkknggqQgW8yG1dRNnevsJRPZyDMQMRObPnIYIB0KOQ3ewyUjfrEsphJdTeIZUn1zYfuTPAkRsjv8w5xvMwG3WF7RSDh4p7wnXleowmxw2D5U5/k3cahfL5SNqaJXBzLVprHRZK3DAgMBAAECgYAZnJs38XAXqe8ljiwuhfbcSApT0bZvKKKbAW4rJ4qfz/cavLaltCOadahgzyb/sw6gP64qetv2ztABaKqtNxjywmfXZkG5eKk5sHUdHJAPXe5xGvVbXcXtCg9uFLuolu0Qhh6g4MuEXfZ5/HhIMHopJKW1eneYOoJJKr+3miopxQJBAPjk+qZ2QMLLx2E9VCnK7sZCkZA6UntagvaMg7ml9pWjxRrTDjWqBBcl3XyXvsj848W21hdCwWdhUKfnPsoiTq0CQQDkDDy40PpPc77soa8u+BRcP7smKuYf9wluSaCv/4sYKw6yWmPLX8leHXCWf9oZbqSvJwH8bVBaxl/NT198rKwvAkBz4aB1ul8CkwAcXQJ/htVPB5VgUlcuyYBqLBf0arn5B8vwZk2aXLMU1/NcXAZe66dc2XiqUdFcQanc0sSgNgLtAkBipFhvqRVc4LgpKxbXvj8wV/Df5ZZ9JSJTLk3vUx4baiSFSUv5YIl9yEY3Ez6H2bAqgzj8s1wap8wwxrCLATXJAkA7DE4k6B9cSwndrS2djI9JHItrLUkoFNjVq79frH8PcFXVJG7c3mG3nxXxb8n4dl5qt8W9Iy6hE3zCilz7AcRb";





    //threeq_pay
    private string $threeqpay_url = "https://pay.3qpay.org/api/pay/pay";                                   //下单地址
    private string $threeqpay_appId      = "66c81be0e4b00bf3fc383a31";
    private string $threeqpay_mchId      = "M1724390368";
    private string $threeqpay_notifyUrl   = "threeqpayNotify";             //回调地址
    private string $threeqpay_key    = "HsSxrEU6sHIW32udk8xKR055q5lqzqtJzbCoMnBFmrXAGc2TvAFrMRKONSuXfuMaBKh8f2RvEP0o3buoKl7i5WINymzPnkYMgg5BPyE5FDb7E5UjSm9ePjEDCrKDUjsK";



    //show_pay

    private string $showpay_url = "https://api.pymrummy.in/v1/pay/payin"; //正式
    private string $showpay_mchId      = "594"; //测试
    private string $showpay_notifyUrl   = "showpayNotify";
    private string $showpay_key    = "c5b4e62bd506ba8b78a7284a2f9bbf73"; //测试




    //g_pay
    private string $gpay_url = "https://api.gpayindia.com/admin/platform/api/out/pay";
    private string $gpay_mchId      = "1828416315993178114";
    private string $gpay_notifyUrl   = "gpayNotify";
    private string $gpay_key    = "0356d6cd250eee7ba9ef9f7a1aa10250";



    //tata_pay
    private string $tatapay_url = "http://meapi.kakamesh.com/pay_api/POrder";
    private string $tatapay_mchId      = "20000034";
    private string $tatapay_notifyUrl   = "tatapayNotify";
    private string $tatapay_key    = "F8F1077E12E6430E8FB81CDAA5FC03F0";

    //pay_pay
    private string $paypay_url = "https://api.paypayonline.vip/api/payInOrder";
    private string $paypay_mchId      = "3132FB00A9144EABA6E5243DA32FA23F";
    private string $paypay_notifyUrl   = "paypayNotify";
    private string $paypay_key    = "3CxPH8MjrtWxU3chLfbA3t4cbcH43OFo4gf4U1gOhtEMgTS8grP9iOTelwLoKWGy";




    //yh_pay
    private string $yhpay_url = "http://gateway.yhpay365.com/api/pay";
    // private string $yhpay_mchId      = "91000005"; //测试
    private string $yhpay_mchId      = "91000048";  //正式
    private string $yhpay_notifyUrl   = "yhpayNotify";
    // private string $yhpay_key    = "3jdS5RnwUnSNsOUQvfICZhps";//测试
    private string $yhpay_key    = "7jqPfsyzqLSfuPlKpxkuEpQk";//正式





    //tmtwo_pay
    private string $tmtwopay_url = "https://beespay.store/gateway/v1/pay/create";          //下单地址

    private string $tmtwopay_merchantNo       = "192UNCC334";                                   //商户号正式

    private string $tmtwopay_appid   = "3E2591A316794E53969538D4CFF849D8";  //app_id 正式环境

    private string $tmtwopay_Key    = 'K#wuMZPkbp8HD^TipRxv1R2~_Ux*Ua^JlSxZrLok=7^3urQ%QG_qpxfCQYPS0A7%tcWDSIea%Z7g1k!xOkAuRTpk&sWcWm_k6::41?nB$ewpA$*EBj7db@S~5UPTgefD'; //正式
    private string $tmtwopay_notifyUrl   = "tmpayNotify";




    //newai_pay
    private string $newaipay_url = "https://gtw.aipay.today/api/pay/pay";          //下单地址
    private string $newaipay_merchantNo       = "M1737210647";                                   //商户号正式
    private string $newaipay_appid   = "678bbb17e4b06d5d4860a32c";  //app_id 正式环境
    private string $newaipay_Key    = 'i6zCXBEMuIjs0AmsBMEsrN9Wodyy33S4RkC2TKh7bwhRLbgmAY998zk5Xa6NbRzA2JEt17owjz1rKeXBmdqCdMfjwR6MTlMxHYhN5CtAY6oVulnNf8XJmblb8G5wjKaf'; //正式
    private string $newaipay_notifyUrl   = "newaipayNotify";




    //allin1_pay
    private string $allin1pay_url = "https://app.allin1pay.com/order/deposit/create";          //下单地址
    private string $allin1pay_merchantNo       = "197";                                   //商户号正式
    private string $allin1pay_appid   = "197";  //app_id 正式环境
    private string $allin1pay_Key    = 'f5baf5bbaf9f6d8eb6420684a60a717d'; //正式
    private string $allin1pay_notifyUrl   = "allin1payNotify";




    //make_pay
    private string $makepay_url = "https://novo.txzfpay.top/sys/zapi/charge";          //下单地址
    private string $makepay_appkey   = "1829113188401680385-1840045975921152002";  // 正式环境
    private string $makepay_Key    = '04003728683241822137002479242609'; //正式
    private string $makepay_notifyUrl   = "makepayNotify";


    //rrtwo_pay唤醒
    private string $rrtwopay_url  = "https://top.adkjk.in/rpay-api/order/submit";                 //下单地址

    private string $rrtwopay_merchantNo = "1347"; //测试

    private string $rrtwopay_notifyUrl  = "rrpayNotify";  //回调地址
    private string $rrtwopay_Key        = "A2SzHXv8U8EBPKH6";//测试



    //best_pay
    private string $bestpay_url  = "https://gateway.bestpay-cus.com/payment/payin";                 //下单地址

    private string $bestpay_merchantNo = "67";

    private string $bestpay_notifyUrl  = "bestpayNotify";  //回调地址
    private string $bestpay_Key        = "MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBALB+zfoVSdUZKUladjZZOL68mzCcvCN2TVvIZTd2OlPnSMTYvRKy+WXNI3FyZCTiXxjDgYhNXNRUgrz7eRzKYGUEAAbJW6UIRxQlCvXzInDanoA5xQpGJO1VuyQq2khX2FuZHnjsNhzghSeufEwsXoi+IrpTGB7irhTZMY4kucHRAgMBAAECgYEAqAG9Lw7uvmR6MbJkDu41nxNIoyi/yv4FO5ZyCy6G7XGfiopKyS8HSwnQcGCUxaubHKaWeloyQIjF/wFe07ItuMY6Z/nFrrzBfSzve29UsQx/bRPD8bRwMjscyIVhTfUrj97vODByWbP6MqVByfvRkMRyyQUNz60jc8Ow7BowfgECQQDVotdAkEawM8A1lPxcr0YlgeaN6lIkUf/W9ftDiAgtKPpft+lstCKF4R9zLZl0BD8niFpzCxm9pipXcVa7Ap6hAkEA036GtJGBof3oWdJ5xWTbLxmhjKFf04U4WuFkykbughvtPlhUNAEY3NSVMvaOlfuyveFD+c8+BBZLl5daqXhFMQJBAMHfP1w2EhBBRoLZq5Mo9I2BLwtGxDh1uakIHXeRcWoaL+zBZ7HgXxwDypipnwKr/+wOT5brUfbLXs1v63dWz0ECQQC5yLHIOPGpPYQ4Mz4o+lnYXCmfgbrN8n74xnplfj3SKXoUhD8jl7shcdTGefPzKLFxP0sZTMXrjTJGLfzEVhRhAkEAzNi5Znfp5PoPsmCMcn3rLDFK6lJevroeAOfhgb11bwKjLwhFJtIHG9EWJ+hhMuTu4bLGZRg6aE3Woo0uSWycRw==";//测试

    //zip_pay
    private string $zippay_url  = "https://zippay-api.com/payment/payin";                 //下单地址

    private string $zippay_merchantNo = "524";

    private string $zippay_notifyUrl  = "zippayNotify";  //回调地址
    private string $zippay_Key        = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBANaAjl2Rj90yaPQSQ0MKoCPN+XnP/5JZqrrJHrKajQtxxFAyts0cn+fkwvI7ytjQNa5dQlDYjcsRGXV0Zy7Yt63102QhPN8IOikXQqkiSazKS3p7N8Qx8VXUu96o9Kcl4u1uyR4Oz7yyvNv32r1+0PcHCf1Op4rZsojcDx/s5omNAgMBAAECgYA/gYIky7LHL2SJVlrZn2y4DQRefylQYAG/GUpgYId/qugPQmSCp4XkNwNMik1NEZ/DBtNacjLQuzhJYPQnl3wRlvGaW/pUlskXsbhzcS/7CDKF2sWQxotASNAnGUjvHv10ienv6EAgkFX6UhlQPsN+E/5lcYc5C8fMBZ3iq5/u9QJBAPcWViiYsAfaA1PMuJ2XE3ovjbgHL++UAj9c9i+sUD+bzAXjPPfSwdoQmHwsgYcMVeGXecIlYy0PO6o7p/z8ny8CQQDePVIwXO3tjVtA+MR4CggSpRZYdZNfsbCtp6I5WEWyHXG3PJdtFzmQUu7DteiU77+/41rfjgj45ny2n4wGTxQDAkEA67OGCwHkYgkJRYYz0jjMnrEAOr24b408O599ROrWPmdrT25+uVV2EIPmQgXepaoRvrpVruslWVV/sBtqW33MhwJAQNqaQnzL/hfTOnmeM/2Rb4d3pubg0/sxuOuDfsKQzDKlfbiT5AT0Cnb5MGnEbrosNd4uJbD4U1JHsK+MmEa5awJALAsGom5KBkI2p2RzezF1/DtrWnCI55MRC2KQ0mxYNXhaHzkVl9XII8HmBxhX8U7vBwLNzonPK9+2QZSVoJ6E6A==";//测试






    //upi_pay
    private string $upipay_url  = "https://api.upi-pays.com/api/payment/createOrder";                 //下单地址

    private string $upipay_merchantNo = "258"; //正式

    private string $upipay_notifyUrl  = "upipayNotify";  //回调地址

    private string $upipay_Key        = "c5C6XrNbA82a134";//正式




    //q_pay
    private string $securitypay_url  = "https://open.i-paying.com/v2/payment/gateway";                 //下单地址
    private string $securitypay_appid = "AKDDIU3FHI39"; //
    private string $securitypay_notifyUrl  = "securitypayNotify";  //回调地址
    private string $securitypay_Key        = "DUWM1BUYCEX894I6HG0A";//



    //allin1two_pay
    private string $allin1twopay_url  = "https://app.allin1pay.com/order/deposit/through";                 //下单地址
    private string $allin1twopay_appid = "197"; //
    private string $allin1twopay_notifyUrl  = "allin1twopayNotify";  //回调地址
    private string $allin1twopay_Key        = "f5baf5bbaf9f6d8eb6420684a60a717d";//



    //vendoo_pay

    private string $vendoopay_url  = "https://api.seapay.ink/pomfret/v1/lc/pay/cashier/order";                 //正式

    private string $vendoopay_merchantNo = "777bet"; //正式

    private string $vendoopay_notifyUrl  = "vendoopayNotify";  //回调地址

    private string $vendoopay_Key        = "3e5283781adf6b8ef4f59edea290b3de";//正式




    //rupeelink_pay
    private string $rupeelinkpay_url  = "https://open.rplapi.com/rupeeLink/api/pay";                 //下单地址
    private string $rupeelinkpay_merchantNo = "241014137451"; //
    private string $rupeelinkpay_notifyUrl  = "rupeelinkpayNotify";  //回调地址
    private string $rupeelinkpay_Key        = "eauxMNmns50iG22vqKfXaD0jIhLEy1kW";//



    //unive_pay
    private string $univepay_url  = "https://ydpay.univepay.com/Payment/GlobalPay";                 //下单地址

    private string $univepay_merchantNo = "C24638"; //正式
    private string $univepay_notifyUrl  = "univepayNotify";  //回调地址

    private string $univepay_Key        = "CJ3DL5SAC57DGPEY";//正式




    //no_pay
    private string $nopay_url  = "https://icw891o.nopay.app/order/depositOrderCoinCreate";                 //下单地址
    private string $nopay_merchantNo = "CBQ3DK9CN67LEKPX"; //正式
    private string $nopay_notifyUrl  = "nopayNotify";  //回调地址
    private string $nopay_Key        = "CBKX2EpjQikiiqK6Bd9zIhkXoOVK7aOB";//正式



    //ms_pay
    private string $mspay_url  = "https://agent.msigiosdfih.com/api/payin/order";                 //下单地址
    private string $mspay_merchantNo = "777bet"; //

    private string $mspay_notifyUrl  = "mspayNotify";  //回调地址
    private string $mspay_Key        = "1B002AB86AC1E91BAB92C5E3EB9352E7";//



    //decent_pay
    private string $decentpay_url  = "https://api-in.zupay.top/pay/collection/direct-payment/create";                 //下单地址
    private string $decentpay_merchantNo = "1072"; //
    private string $decentpay_appId = "107201"; //
    private string $decentpay_notifyUrl  = "decentpayNotify";  //回调地址
    private string $decentpay_Key        = "fLgwZ5V7sqavYNSPzq8hStsj6pBA74CJ61l4HH3php7xqqXiNxJzNagxIILvUY6tNUKlU8MR8NDC+SLrBVaoiw==";//



    //fly_pay
    private string $flypay_url  = "http://www.inspay.org/sapi/payment/common/payin";                 //下单地址
    private string $flypay_merchantNo = "999911256"; //

    private string $flypay_notifyUrl  = "flypayNotify";  //回调地址
    private string $flypay_Key  = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCp5ZoYlL/4gGcO1N9PXhvUQ/3uh1SgTkCwjOXKMQYk7JeSSK+32Px3jZt8GoyjC/9J66ybpPdKyJLoaSmD5av/rw3jyUOL6rdfwo0pzdK75kfxsJUOqtVy3+gOTSRQCvVEjqROwZVdzOlgzUTmBLT7mdALRDWh1wSeur887OAJsXKAN8aJ4fakpjX5234kayyLYfYfqEmeUytN//HN/v1T4BcfTzkJLD6vLR3a9vI7noyvaofzy3sSlVpHWoDkA5gAbS9D3uE1YI5PodWHabr1PC4d6mD/Bi/6crCKBCPTstJcFWVfOzgLNxJkuEpi2Buz5fObgNIgGkQQNufsmaq/AgMBAAECggEAFwKNuD6NMW7ShmO2St2ID1uWDLQvdfajNEYg6R1yo5WXgaxugAvXRancIRbHbV22maBdpEbXZz17CBcWFFMK1Ho0+2DK0Sxc4Y9L5xmFLQWnQMiVp4LjncdNeoJgJKcXSM242yHExQt3oDCs4CpLCLhwQNZgHSct7QGF3Q6H2UgCQTNxFOpsYHzI8LBqwROGHv5E6/UN9kGUSpQf22LlzhJLb9oJDyvzk2b0m4fb2/7OBJbsdClD7PwCKn+mamvLTbjDBZpSm13tmTtgCRUV25hDREQzyBNeJwHqclK3gMMz58FF0YZIcNBrbWel5v32cZkugDj10J8Gln/g2b6q4QKBgQDq+aa/KDZ0vq/9VaaKWhZL3eeQe4V6hu0FCkqQw6Z2lzlRGVAzOAoLTnvAW31fR7I6xB1w5QkzL3P6GjaH93Cq7HL1um/0MKFLHPaD9i13V5p7YD7qFIjVPlgv+6vkCjrQvvudNi61R9K0y+X9gyGeIppgRUIVL7IUMoqECeiRgwKBgQC5GUPIQ+tiNCW2Hld2kuO5ue0wn5Rj72E7BqrPdgT3TrQc1UTLLO/SQdEXSG5mp+9C8FmikCbDYXWeSXfu8VsJ4Ep/ujHj+J49VqK+sQthA8kvyKUeMMXbL3gF6emstW6kbU3/dLoU9arZGkpNX+PJ1obBjwV1BQiR/93JPx1pFQKBgEE8bIn3zR6eblfkNqeEmVoY0phvYsCAwz85+zezyfx0wan9YCHINimrcXoXLHiOfDIKjq3wOJyoWQefzXH0Rah+mvAUAc8GzVEASoSajUbr4GzObMkqSE8DzxILSk62dFvOGicsis0zkpE1ZrX6eRPhQYDm2ZDuO/+VhJVh9tqnAoGBAKzeiq6DuFccKsg+6CKmpyYzHfGWaEk5LQ6qeGaPa63pBFAVYk1653Pv4i6jh/A6ETvsK1qm1H0PDYFKTkeLhCHiJtHJfITUEj1pJ09/HAh8N6537rYWiQLe/3JOdt3FCNNp/jmBs7SVh/2BDznaP2ym/W3SfB9BFzL7yxAD8RzNAoGBAM67j156oSVF0VH6d2z4/b/9wTLSjG69gzaQMq0eiZPE2TQwZ5MwnmHeUleELOau98BGweNdKBDjxSEzSo//r1GL46usT8Ovy+wDJo62wkBvsnVC9bFmvVTXxTeEshbEm6ylRM5twOmmkoELsVC36XFZ1LKFu87NXdnLOKnyr7fw";//

    //kk_pay
    private string $kkpay_url  = "http://api.zhkap.com/pay/order";                 //下单地址
    private string $kkpay_merchantNo = "1000100020003416"; //
    private string $kkpay_applicationId = "410"; //

    private string $kkpay_notifyUrl  = "kkpayNotify";  //回调地址
    private string $kkpay_appKey  = "2FDE621690694CF9B2FC80EBAB9F53D2";//
    private string $kkpay_merchantKey  = "20E87B6B726846BCACAF261AEFF33B6B";//



    //tk_pay
    private string $tkpay_url  = "https://seabird.world/api/order/pay/create";                 //下单地址

    private string $tkpay_merchantNo = "202466298"; //正式

    private string $tkpay_notifyUrl  = "tkpayNotify";  //回调地址

    private string $tkpay_Key        = "fca35368da5d403086dcf248103b432f";//正式

    //kktwo_pay
    private string $kktwopay_url  = "http://api.zhkap.com/pay/order";                 //下单地址
    private string $kktwopay_merchantNo = "1000100020003421"; //
    private string $kktwopay_applicationId = "415"; //

    private string $kktwopay_notifyUrl  = "kktwopayNotify";  //回调地址
    private string $kktwopay_appKey  = "CCDF005D598D432ABE36A10C621819CA";//
    private string $kktwopay_merchantKey  = "8A76608C2D344C279F67FE507CD34ABE";//





    //one_pay
    private string $onepay_url  = "https://api-in.onepyg.com/cashin/india/order/create";                 //正式

    private string $onepay_merchantNo = "3619769596"; //


    private string $onepay_appId = "OJMXy4x3uNmVaOU8Ya"; //

    private string $onepay_notifyUrl  = "onepayNotify";  //回调地址

    private string $onepay_Key        = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDY+5ytnLAybiUT7+Av1+EjXos1CLdfr7L9hKJPdIooaRJusNA1pXG2kbg6BfexnkvwHYwyyTnGl6oDpkzxl4qYg+YcjbTIvouxMsP/A5cP5W4nlTvY6D/lexEjmVWbC5FdnXPun1Gh2WGTEqpXIqtEjuVAorC28NpLhtjcZAzYze+HcnvnZywUHBfRUtoa6pXr2Gx1A+yYkJAdZhuEcMzfcBTEJT9V8Jc4CYvrdshJpVO4jU2BV5LIXXY88rxZD/2qViPs27MrIUfeCbrLHGY3c25n3uvf+4hpjUj/biFMmb2ExBMxytLC9EZuZiOv+PsaBiF+KZWIzg8HzSOomHvTAgMBAAECggEACUTKPxJL5oOU+uKKyZBnshqWSLgsGR7IvxKc2lcIlcxTOL49zqTYFCvqWjQqDgDMjp+8fujgmm6dGRXQAJvwFC7CNCMLf23AStv3ylttZwTubStvSIc3P4a/xy0EHqDiX0TcEGvm0UqXY/BurVUySrXt7hJlCROFx6cleViewd4J/kLGHHgsEKy1ocfFym15auCLKWxQjdi7Nn/3w7uUHdq8XlXb+etC1vjcu5cQuDmSiQRup6RZs640ppn1vusJt8CscB0zokYYhMl1dTI5O7TAy94ilgG8SJEF+qKtsNxw/xUeJ8CC8tggRQUSmt4Z5vOOjAZz84AvwQJAGWcRvQKBgQD3OAZL9JZWqnTJgmBGdUpB73tKbKf2utna5B77Sq9dVHHs0N7f5YTHllIR9oKYTue99LdC+2f+7r92drFEiS5Yh996ACFv5K8dGd7M3DoZzjsRiuH2D3dzJXJ9VJ0GpVuGDiT9jV00TBkZYHUh6M8oVSazX3ckbuWzSzUquBoW7wKBgQDgsKZbowzFyiYFPq3ZcmSVPs1VD9wfXgfQaE9JOGX1eFn9+HdnjWMxC3//DyvZWsbXx64Eqfb0AGX1dXQ74YzRRqPR84cH7f9sNLFUv66MECdx+dhi8OddnfeKFjRWdGM4Ge57kc3M+ioJbF9qThJMHJJ6u1eX7H4fLqu28qxJXQKBgQDrAxJRUHE+cApXqZ4WPNfbuGpPBN3jWhtRz7x4DLaKlYU7qA/Hbmv8RDU+qEXbvl7lIGa6wT5KhfHzDsBTs8kgFgJm+wrOUOn7UyWPP+fnsjpK4ekOvgNCrh2ZcT9ZGwbXeEjH1IP+/Dx7+EtBcgzEfbYtnJopQ1cPS3Z+Zsc+dwKBgBxd8QLMuQYXmWk8GpLDYHN/NEky8WV8Z5wmLyxdVHIDOclYnyqRrR46B3TaI30TetsvOIcaNjVj/3tX0s7kkPSy6GfPSRL1NzQgCutaL907BN/c3TbQl0U4dlIWr5DirMweaf9rzwG766a46erv5Ft7l/qqwEpL7zhcmg1E4f95AoGAJqfsBW6PnVVJ6K4oADF4mokFQwXNoTRkZE4vmlcubdpGKL3hiLQGhaXGtkEChxoIPFeO6KgI7Y4N9ptJdMpDy6cPKMwxVrl1fsyHPUt3srwWOzf1GwQ6TVRXxGbNym6X+lPT4UUL3L8rrhcCazSFB0tOkh6aVn6PGlKcUvENtYQ=";//




    //global_pay
    private string $globalpay_url  = "https://gateway.globalpay2024.com/api/deposit/order";                 //下单地址
    private string $globalpay_merchantNo = "180318"; //
    private string $globalpay_notifyUrl  = "globalpayNotify";  //回调地址
    private string $globalpay_Key        = "6e143bc02801d64e21369524e885dc0d";//



    //a777_pay
    private string $a777pay_url  = "https://www.777-pay.com/open-api/create-pay-order";                 //下单地址
    private string $a777pay_merchantNo = "ca5e5a7bb1d140669f4907c0f08bf723"; //
    private string $a777pay_notifyUrl  = "a777payNotify";  //回调地址
    private string $a777pay_Key        = "UXCt7sRLGJyFYzQmRLEEMlbeiQygkQ3aFmBmXs";//



    //masat_pay
    private string $masatpay_url  = "https://api.masatpay.vip/api/createPayOrder";                 //下单地址
    private string $masatpay_merchantNo = "507757308571422720"; //
    private string $masatpay_notifyUrl  = "masatpayNotify";  //回调地址
    private string $masatpay_Key        = "507757308307181568";//






    //ok_pay
    private string $okpay_url  = "https://api.okpayfast.com/pomfret/v1/lc/pay/cashier/order";                 //下单地址
    private string $okpay_merchantNo = "KFT030"; //
    private string $okpay_notifyUrl  = "okpayNotify";  //回调地址
    private string $okpay_Key        = "3bd7b313f6241e5ed642f99f348ce672";//

    //l_pay
    private string $lpay_url  = "https://admin.tpaycloud.com/v1/inorder/addInOrder";                 //下单地址
    private string $lpay_merchantNo = "173167369055727"; //
    private string $lpay_merchantCode = "paystack002"; //
    private string $lpay_notifyUrl  = "lpayNotify";  //回调地址
    private string $lpay_Key        = "00f8800c10354196b9134a8b80522018";//

    //liku_pay
//    private string $likupay_url  = "https://test-api.liku.io/open/v1/payin/create";                 //测试
    private string $likupay_url  = "https://api.likupay.com/open/v1/payin/create";                 //正式
//    private string $likupay_url  = "https://api.likupay.com/open/v1/checkSignature";                 //正式
    private string $likupay_appId = "VjMZw6JULQAQAAAAVAAAAABnM_2GAABOU3JkVm56V3Q"; //
//    private string $likupay_appId = "VjMZw6JULQAQAAAAVAAAAABnM_2GAABOU3JkVm56V3Q"; ////正式
    private string $likupay_notifyUrl  = "http://www.3377win.com/Order/likupayNotify";  //回调地址
    private string $likupay_Key        = "KuObWdNIw0ZshXcQzDYJyvQ1YI60L2GUmHu9AwHr1IBnzP11P9N2BsjQBZty5pW2";//

    //tatatwo_pay
    private string $tatatwopay_url = "http://meapi.kakamesh.com/pay_api/POrder";
    private string $tatatwopay_mchId      = "20000037";
    private string $tatatwopay_notifyUrl   = "tatatwopayNotify";
    private string $tatatwopay_key    = "648863EBB9EE4E8DA32A4125D4DDBBE7";

    //iq_pay
    private string $iqpay_url = "https://api.iqpay.in/payment/payin";
    private string $iqpay_mchId      = "KKQ3WCGCLXS5C56W";
    private string $iqpay_notifyUrl   = "iqpayNotify";
    private string $iqpay_key    = "438cfmqmSlsTtQJ3eY5Ht93uB4TPHbZ1";

    //bo_pay
    private string $bopay_url = "https://gtw.bopay.vip/api/pay/pay";
    private string $bopay_mchId      = "M1732188119";
    private string $bopay_appId      = "673f17d7e4b09f5f408e841b";
    private string $bopay_notifyUrl   = "bopayNotify";
    private string $bopay_key    = "T7xUaCGTBsIhWVwNLIXTdt19oniWsUNgYLjgJU2m4jGT6GEMnPaLKpDQmuEkMxgtN9oMMPRPxx3wlYbESQ21oG88j7fUgRCsXb6iipRiLrvTWk7YtJmyKuNepCYkQ9JE";

    //bud_pay
    private string $budpay_url = "https://www.two-buddy.in/merchant/v1/payin";
    private string $budpay_mchId      = "8852";
    private string $budpay_notifyUrl   = "budpayNotify";
    private string $budpay_key    = "VOAishz8Dwkf3H5EX6Im";


    //buss_pay
    private string $busspay_url = "https://api.busspay.com/create/payin";
    private string $busspay_mchId      = "10094";
    private string $busspay_notifyUrl   = "busspayNotify";
    private string $busspay_key    = "RZCkU1vpJlt027z3mCZJoMVYLQLWq8VL";



    //shark_pay
    private string $sharkpay_url = "https://api.sharkpay.vip/payweb/recharge";
    private string $sharkpay_mchId      = "10001489";  //正式
    private string $sharkpay_notifyUrl   = "sharkpayNotify";

    private string $sharkpay_key    = "zwlbrelsvk8xad2okxvopstfr6jmufhg"; //正式



    //lemon_pay
    private string $lemonpay_url = "https://api.lemonpay.top/open/api/order/in";

    private string $lemonpay_mchId      = "120084";  //正式
    private string $lemonpay_notifyUrl   = "lemonpayNotify";

    private string $lemonpay_key    = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAL7TKhC1ozgF/8ms1TFI2SJZIDEXyGzbFOvdz1hkAykCqq94am3lyPtcTHiMfrZPE6tBLXu9aQMcm6hCQatXvRzJUF9kD+jmltv76nVSsJzGimg9VJv6SLsUPD2tuzyT/NfidoziMCoISZ5LwBr21XnA3KM7ykK5hKiCVggr61EzAgMBAAECgYEAqG2PomH/53H8HBDNt4t6A4QxEsPQJqyUYb9MxNK5q1fsOaaKIegApkQIRxqSuO1BChYkRCShbJqylSet+MMfaaEb3N31FegX9/womTdzpX6aicKgelvK5+27Y5NuGiZAD5iDQ4ufsXfnSa4cU46oLXAgQMxnBfYcHc6BILSbx4ECQQD5G2BvFDjwOxa+qyocCi8Crn6tv81pxyZYJNXvYABAF2fJDUU6DAmCcj/Qr/bIFjMMpttSOm2nLhRLGW1RVWTzAkEAxBrt228riuVoKvrpcUSfb+elwVVCbQ9qHPnHXmbJ05Z1fdaKE7aveyHilExDzcGm/sh8cr05auT+7G9o+5JywQJBAKwzeJ5Q5Gts7XQw7pMjlwvLhFan2F/fA2q7TAiF3KZxh5U8TzapS4mZYPPqMDZw4ilEzygwq8x91hl0IlWvKnECQFUi68isRtcSKVsfe2F1TVKj2s5IWYJHguX5eph9P3nghDmRfnh4g06Ns3R2d6lIPVu3Zm/Zvqetqw6yf31YYwECQFB/54MLMLKbTsECqVcfh1EVYFNUZ5VGfaQLos4s4vJO2iWQ41znLyQsXGI+LnvtsgHMB/u5nyr+2WQ2fXU15JA="; //正式




    //panda_pay
    private string $pandapay_url = "https://novo.txzfpay.top/sys/zapi/charge";          //下单地址
    private string $pandapay_appkey   = "1843641620514967553-1861346220705533953";  // 正式环境
    private string $pandapay_Key    = '69448669046951478446690678118620'; //正式
    private string $pandapay_notifyUrl   = "pandapayNotify";


    //uper_pay
    private string $uperpay_url = "https://core.upertecs.com/pay/orderPay";          //下单地址
    private string $uperpay_marchantNo   = "26544125864";  // 正式环境
    private string $uperpay_Key    = 'A0A53D7030633D0963D5EF4251354CD9'; //正式
    private string $uperpay_notifyUrl   = "uperpaypayNotify";




    //six6_pay
    private string $six6pay_url = "http://15.206.97.107:9100/api/trade/createOrder";          //测试环境
    private string $six6pay_marchantNo   = "MI162731473800286209";  // 正式
    private string $six6pay_Key    = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCicCKMqFsQrVtUo1dxlR0ZyAQknCS0xO9e5KAM9u4i5X+pEXykxHlv4AjX188AE77WNiYgn5zBMEeCFJR3kCmOmTWgcAKAIB0DdWTK5cHRaQpAvlEORs9b+fKpXbbHvajfiYUaH5yxjE8NTxYO60p6FdBjsMjWeJ9TiUcEHD5QxdewJq3j8mQaDJDOMq2pjqxf9TOY4ALjqw/HhP8p7/KBJtcCmjfCXE39TMRW37V8ybPUqRAdGK4zoDMltliAG9bDtFuLopnigalPsdOLrGs2rm75kCJOqYoPlYbl8FMdZE0bIJQcEhIMEppcXD+9MwjckOBsGmXw1S7CvQyV4TmHAgMBAAECggEABBE8vDrm9NbyZ38jjGOIdAHPIL+MJ76ao8yjuU9hjRwkAy696T5GMCfy8LyloUHdUG3QrJZyjV/RGo+7W/cPI1PwxNCpL14ee9yvpmj0XnL7370kOHBLdukeS2FeV0gHd3lxDMNn4AY8YH/vdHYtyjrLmgNuM/iXPLc+QPsYEFupmzGZ0FnHb81HAl/oZCmh4pGyubqOLbX8liOcNUeCSqLk9Xr5Ge54FO9mCZGmBUZ3IhLd698l7dzglq7PvX+mWsYLO9Jbpq0hHkuj9KT+BZ+Doy7ZTbW3TnBnm81RhP0DeCikaLMwmtR1JcqQeuUt5v0Udv6fbsxLZEDCHL9GCQKBgQDasZAcjBl+XihCBjBaVTTQkE1VTRSGkXgYJoNYH4xRw81bsdMOl9NU6QumoymazwJVFARhFlGrJIfr7qgmvVfBigttdJlmAN9uy/aya0o1DJI/SFenOJAFFkFCOocXktwn3b+nM+AIAfq/L5IcHiReXHohGe1VE0nuCsZUDK4LVQKBgQC+Jd5T4sDAC/c2p7rBxKtI008OlxmoRbFwWu5BCD/QdCfHssIT9vcbzfpzgibNUEHsoXFcEu9KqZFEAfPDkx/V0nrofq9tcODRTXrRNXO8YvekHgjS/AtSF8tyWJXMk1c+zBp60NuQ+nuzgvKoTsTokCjtzE/xmWnWtSHgZMqJawKBgD/K3dvF7kXTV3Dy9zXSdwaDoVtJkbwzQNHiohuZkEflksi1lXhDR20UUca4/5Dd47NHlINxjD8c990Vj81FHA0jpHO4OGrtxD9AleSzsUDKOvrkslTgBfrF5CFaiz+QIlIquBYg5q/PTAJq8Pbsv/UairGPK5DOgJlEYVfxHu/FAoGAWs06nlRqN0t/gloWlPGV2fEOj6kYV4LwePbzT5rg3mqZlIOIqoAFAQIb140PenwY/ycZOx7PppfTBubnwT1AtpsMlnnozBpbQZf+Tml4Gz4ng/fTvu0detZiEPi8kDTMNPDCtGOIdnMnH1IpDraO0YAGC4jFpFnecOmOg9md3oECgYEAqzLEi6GKFA2eLnNAlihGZLpSIa3DqWEaRcay3LDo9q7J8fjboO6GgDB9jAwyYOI3k5gt9/4CRtzoEYXclrUmYxNOdi9D8II+hO1/x0GULBraqEraYiFWl4IbXLG2BhjH/fl5fgUp6q6lRmgs3Jsp/OsmTvpiD7oLQxf8PipHx0Y='; //正式
    private string $six6pay_pub_Key    = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4ze6SVq6y8JQYURq+kWt/v+1JRVxuNel7wYexnkHk8Daarp4kQXhk+ZDvu8VmLUGNyU/mwIe8XVUcIs5gvKBGmq80pSF1f/8afNixlaDl/vKLmezeq0PAc7MCPGFZEvIXXZK1snI3FeDPAYfvliN1Jn74IQ98s/rDjegZ4yqd9QS8A4zG1CGyjqN7Zcjts19IwuPX0jo2SnJmFx8Vf3B5k2z8od1cRnPEBpInhlfprSM2KUjBjKBSdmOuX93Jr2JwSFYJNixUsw5JvCanNuZZXpIsOdsnc+kKfqk64CltMd9BmD2+wC/MuLcqgb4itNpgRMUq9dyeSTk0XHqgCoxkQIDAQAB'; //正式
    private string $six6pay_notifyUrl   = "six6payNotify";


    //mm_pay
    private string $mmpay_url = "https://api.mmpay.club/open/api/order/in";          //
    private string $mmpay_marchantNo   = "1000202";  // 正式
    private string $mmpay_Key    = 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM0bZtcW+NOoxccy+AtiAUOb9YRHrQ+Q7lq2RSMzngBRqj/vJJkV63M2DksywO6QDKkmFcHolEqmwYeUCKD07NkLaRHG0GN5rQxB1CHWr9M4tHktxd2pYl1P+GCTObO0bqrFjYTUTr8xd/NbAPA7OKyETxmJtGqsdBx6AZdR3oSdAgMBAAECgYAJAQPxu0tvF0Cfbwhej43YpvcPOIpLXaRpDQlZ80EjaHJd3iSwJ7svUpcsC+1WS7KSll5sJcakxE9IoWIDltzy0hYPhFnpIupUaVlgyxVUFJ1WAsHc8pg1l4MqNqNF4VtbQnQw2X8zEylHY9K7HznbB5vJ0c+Mdr+8oKx6fJSgjQJBAPamYi6psugdyxONK5TSoq9nfGu8M8aF25kvGd/WBEVUL0cqB31Eb2fZQneZVevSUrULhJhht6+r2pJW40FwSPMCQQDU4d1iGewGFX+splZnwmQ9XMU5o+UbcI4yOa8uw3jr1aUQol9hiSYF6vz1XkO8IyWgB+0R8k7Ehy2rarYbAmAvAkEA0f1N0dSAkMXswzSJSicagqNkdoTAv9/u2jgTm1ImSLAnoDrULX46Kvv5bsGJOUDTUXgA54sqS9HQQI7g5DGoqQJAPIPwcOC5jYkzABtQ2LIT2LW0gwwqJsC6S2DGgd6jUzcqcy4VOx7HpksEmaOwUZ0UJwfZxo5BAfEDdIUjO05TlQJBAPD0r4U4+vGaMTjG59mgzoGAchsFHPYhkJXL5NGrbDMrfZtNJyjJZHIII2VHJ2HgGB119wrAcf8/MusFw8j1VHc='; //正式
    private string $mmpay_notifyUrl   = "mmpayNotify";


    //fix_pay
    private string $fixpay_url = "https://agent.msigiosdfih.com/api/payin/order";          //下单地址
    private string $fixpay_marchantNo   = "777bet2";  // 正式环境
    private string $fixpay_Key    = '071AF48045745AA9F175C77D028486FD'; //正式
    private string $fixpay_notifyUrl   = "fixpayNotify";



    //dp_pay
    private string $dppay_url = "https://web.dppay.net/api/payhw/getQrAuthentication";          //下单地址
    private string $dppay_marchantNo   = "777bet";  // 正式环境
    private string $dppay_openKey    = '6521e8e0a289f98b14546d72c28c20d63cf9b3081831a97e9f149ae164149ed3'; //正式
    private string $dppay_notifyUrl   = "dppayNotify";


    //lemontree_pay
    private string $lemontreepay_url = "https://api.lemontree.love/api/inr/recharge";          //下单地址
    private string $lemontreepay_appKey   = "E210DFE25591B075A6";  //测试环境
    private string $lemontreepay_appSecret    = '76f26da08f44e2a15fd2682f7574594481fa25e0'; //测试环境
    private string $lemontreepay_notifyUrl   = "lemontreepayNotify";



    //zz_pay
    private string $zzpay_url = "https://api.zzpaycloud.com/pay/v2/createOrder";          //下单地址
    private string $zzpay_appId   = "579512892064165888";  //测试环境
    private string $zzpay_appKey    = '1027ab9a-eeb5-4084-8680-51e1aad18fa2'; //测试环境
    private string $zzpay_notifyUrl   = "zzpayNotify";



    //s_pay
    private string $spay_url = "https://www.mars-pay.vip/api/order/pay";          //下单地址
    private string $spay_merchantNo   = "M2025020533";
    private string $spay_appKey    = 'ca00b66b73fca27b4986898caec94c06';
    private string $spay_notifyUrl   = "spayNotify";



    //ant2_pay
    private string $ant2pay_url = "https://asia.antpaytech.cn/api/addDeposit";          //正式
    private string $ant2pay_merchantNo   = "1887712646760792064";
    private string $ant2pay_appKey    = '544af589-d142-41b3-b644-48aac57f7750';
    private string $ant2pay_notifyUrl   = "ant2payNotify";



    //aa_pay
    private string $aapay_url = "https://czfk.aaglbpay.com/payin/web";
    private string $aapay_merchantNo   = "100019032";  //正式
    private string $aapay_appKey    = '83f4c873d8894ab5ac03367637d9b9c2'; //正式
    private string $aapay_notifyUrl   = "aapayNotify";

    //peu_pay
    private string $peupay_url = "https://api.peupay.com/api/merchant/order/create";
    private string $peupay_appId   = "67d45dcd0b0a367f5535c79e";  //正式
    private string $peupay_appKey    = '5d0bbac7d2974cdcbabf97e637ecbdb7'; //正式
    private string $peupay_notifyUrl   = "peupayNotify";


    //fino_pay
    private string $finopay_url = "https://api.11pay.me/pay/order/create";
    private string $finopay_marchantNo   = "mrfJaoZIlz";  //正式
    private string $finopay_appKey    = '0d895b2e6ceb4e9ca4b82e4d2a4a51e2'; //正式
    private string $finopay_notifyUrl   = "finopayNotify";


    //ssbase_pay
    private string $ssbasepay_url = "http://pay-api.ssbase.net/interface/Recharge.php";
    private string $ssbasepay_appid   = "860043";  //正式
    private string $ssbasepay_appKey    = '2f69c4eb3b4fa1d1b9eafa582e026425'; //正式
    private string $ssbasepay_notifyUrl   = "ssbasepayNotify";

    //ziptwo_pay
    private string $ziptwopay_url  = "https://zippay-api.com/payment/payin";                 //下单地址
    private string $ziptwopay_merchantNo = "716";
    private string $ziptwopay_notifyUrl  = "ziptwopayNotify";  //回调地址
    private string $ziptwopay_Key        = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMzB0827WOH/BdcR5AZ+NkbPY0qMfpm9Y17peNHg4XzSWL/DAPH8kqsPnnKeL8oWLIUzT31Kkx4eIvSG50cSnwOsKqkgaZ8pKBdmn/EKe+2IekfRDM9UQJEcPRJIQ5fyrQG3gU8G+LytikG+s2usW8h0YczmhfuubGhpEayFLkBpAgMBAAECgYB+1k6y8av0ivp+KLn8/6/1m0BhjLhb2gK1Z6ENOeXUYaTSXSS3wgLE7m7zh2QJJkU72fYSoeCSVo7GtM6Nq05OZ3CZ6/Yef9z3XtBbdb54JDp/rL9G5NI/kuDjF0Yzq2rdz+2tY5YVPeopy2K9uszLw0ysqpyGzHhrwElLtWJFZQJBAOUQdGHlU4MU9dUXxehlVDoRm7Hl4KHMjo5yv0mmsvyHNhKUyAtR93LN2OPtqGV8vsionf3pzDpiGh3OzwyHBVcCQQDk1acI6dE9L56g0BKgutR9Kbin/xM+0KDZhWasml23He/Y/RDL5N2VMPtkwScIU39jcUveqH+IH4R2oGAHxZA/AkAJnmdEtRyMpJSuHhFxcM/YoGSpU73bDXvu/2KI9TcO456hqR29W/PIHly9NX2cxWA9jNcVknvA992g4s5O+FyBAkEA1pBmYHss0Fw4Nr0i2kaUOw/FrvADEaD5UTw+O5U6Thrp6+HNwADGq78T2TMq8CmqhomTBCGmAvLad4iEwoTCbQJASQXY9C7KFUN8C9mXxEe/gvr+VdmfKVQ/dGK+qmqdSXNJbFqXAOyX3KWwv5iyzniunI7PcPoozGhpmHmPPHqjJw==";//测试



    //qq_pay
    private string $qqpay_url = "http://api.qqpay.store/appclient/getUrl.do";
    private string $qqpay_appid   = "100592";  //正式
    private string $qqpay_appKey    = '11483737cfc74bbfb973c2e14a66fc8b'; //正式
    private string $qqpay_notifyUrl   = "qqpayNotify";




    //six6two_pay
    private string $six6twopay_url = "http://15.206.97.107:9100/api/trade/createOrder";          //测试环境
    private string $six6twopay_marchantNo   = "MI162774139159023617";  // 正式
    private string $six6twopay_Key    = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDx/6wV3dPHPyxmVmyZPEAy6asH0lNGcCGyaYk+kvJfn+8JsYIV4b2ENc0P6HuEFGBUy9NPHkX9PpnzJHlXi3rJ9WAlgYnNChu2WRg9EoAo7H1BM6FSHvyrfzmxWQXeCzofYk1IK6+h2ll0caw4TSE9zSaItKtHNfkZVRvrm1SMfRu6vYm46yCalSYknbRiy1tERAMlxkdPTioS6mQ7+ei4Y2eyOyYoyxYN/gsccbowXFZLOHxpecnp0bb0hh1loW42R0y1IjlDL3eDLoenhNdF+W9nk9P/4Y77Pv58rh3wCH/L1U/yCbZRynft42uvUtXKr/7YXzwF1KrNA5jED1BFAgMBAAECggEADi4BEeqZ+zmzpY8d/7rqImw9ggYRgetV7Mu7x7pEWuo2ugPtaiWnHT0qIJWVT9zXdH3ZShsX6+8+2zfG0g8hblODIyIhu61Xsy8pw9cBbO8ce2qlzXd02Sypf1TcH+cFrGtDZChGey6djBHmuYl6xOcFgWr1V+/CQo58ML7ngkVrjSz1NCLKm8dqsENu4nKWqWubkqQ18c3zcBac8jp9PKpqhHllRX4XZkYEPf5Jox8ZRvXGHmxXiVZZVtnrL120EzQl0uvqlbA3vyGXZDaQc4O4Z5nvkF0k5pUTbgnoLUJTpCDmFqC0GroYNJdL3UeosrsXq6vZg3VtU3ysB6oXgQKBgQD+mjhoXF0vIfl857QbXAMLky/p2+EhSp8wlBw8sytpykoOliMLqTcyT4NKshOMsrh9ddz8R2W0GCLXO7EKft5wbO7ZeiGPhqWYwTUxA6vRGDhtP8M0expTMdjT328z+C0t8UL2j9M5bY+J76OAqkKOLVa0LmMcts0RZmhPSY0HxQKBgQDzU72TdsPs//bsIUnO2wHnGsCwn9MINPHpnBcUDQqYyS2yUKvIr3PUsqV+fQ3rtZnSFdBQoGaKq9dwZPeJjsEeF40aSfVeUIEKlV/oLBB9YF6CqLkHfxYz/QtBqs5smrKIZ9UmYJ8GkinEk32i57fd0Cw6G56zbev/XCEQ+sUugQKBgFF8LFeCUDSYjA/k3GjxPuxCdFBFlj0gc+iJTqxCr79RBfi7JoZB5y+L8TpD2ivqu080HMEFXNCR9Pyr1xLD3g9fXeZuxzT3ZCKKm6qPQTtPpCebA6/VQmykBIBy/1VDtboBgGwHRhQYM5ty/gJc+6Yjbp+GRSRYgTNzcikGIkP9AoGAScYT7kfN82dP2Bvnot3n38fOsD5k31IeHnQC00N4+QXV4wBudPQtLEnVv1nvBI4UywtuE2PucxDSyvLx0jUD/DmrwFK4IBZMaYcMgvoJLdowDXFWWB2B/9UyuoAtAeSNSKoih/Y3gOiD3WPSbbfPmWLqZdvF7CThrpSiOeGuMwECgYEAsCJqjJ4rMxLLL4sjrSvyX8eKWFzJro/z5CnYVBEskc5znqLQyzI+5DqBcSftvxD7pBWz8OcGmekiP0+gvqzU6ZMIy18KHKwYgqm+6Xr18pETtFgcxaTAzld1xC7RRVLbXNqiXMFRPbZMCO850m3R4Tf3f0Xhir9P2gjoZPhp1RQ='; //正式
    private string $six6twopay_pub_Key    = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhQXRl/loN/yneuHQ9/FWWANdl20e4fvxbLAajEUILVQ9RJci695qcAQkPk6+Oo/pWNrbBp0d0pNTWWYs1HaESXnvmpfck+kHjozlaWu/NrPU8zwfuTbdiVm8rX7lPrzIqwnBe9xNK+pBv1GlF+MQl2RKsaZho4KIjZaymlmok1L1hGqphpOxy3oy8FXwz7rKVcG8jpazINcJDvv0qGtTtZbSOmH9anfwmEmCd4ggFPB4X43R/SH1PnufNWotliP2wHx3HJ2cdnKw2BWnWGcfy2VvBNf3uTv0ItmjwTISs31MSg5mIoiRV01QengZv8cDBjl54h7KnadwKGdQOB/NNQIDAQAB'; //正式
    private string $six6twopay_notifyUrl   = "six6twopayNotify";




    //vendoo2_pay
    private string $vendoo2pay_url  = "https://api.cpi.seapay.ink/txi/v1/api/pay/in/cashier/order";                 //正式

    private string $vendoo2pay_merchantNo = "VD1026"; //正式

    private string $vendoo2pay_notifyUrl  = "vendoo2payNotify";  //回调地址

    private string $vendoo2pay_Key        = "022ff94ea0b497be26e7d093a368e0b7";//正式



    //show2_pay
    private string $show2pay_url = "https://uat-pf.aypaypro.com/open/payin"; //正式
    private string $show2pay_token_url = "https://uat-pf.aypaypro.com/auth/def/oauth/token"; //正式
    private string $show2pay_token_refresh_url = "https://uat-pf.aypaypro.com/auth/def/oauth/refresh_token"; //正式
    private string $show2pay_mchId      = "214"; //正式
    private string $show2pay_notifyUrl   = "show2payNotify";
    private string $show2pay_token_secret    = '~E5@M8tZ&cDl9'; //正式
    private string $show2pay_key = "MIIBSgIBADCCASsGByqGSM44BAEwggEeAoGBAMDpTtaDVjPXtEbAQh4iW1V8u/OUGVtzd0cqIGT5OQV2Yf0sBvFurytgjmfZoEnxN03OHcNa36ujlgjVwMLQAOgmVP8Q6tLK/8C2+/BpH5marAapuWC97hELyT0fO2vpxSNORPtXoog7u3iz4rnHGmzoHRtIX4e/4eNn+7JZMMuFAhUAis3RxINL2g90cIst6z6FGazvVcsCgYAAlkApPJqPBNL1JW88WBWukm1Ga9Y5uBet5Cq9av6UeHh/0XUs/4g9oYFJW8Q+mjkqdPsGLIAYvMagrGM+ojHLD/js2SCZyiT7RKEGLm9bNNFo2ZFinmAJD3H9QiC2c6HNKpHl10sTyQosjdVmtCgaS8RqpqLS8QWLv8IhVCdeHgQWAhQ3dfrFGPkX8SI90LHbTIx0eTU2QQ=="; //正式



    //six6three_pay
    private string $six6threepay_url = "http://15.206.97.107:9100/api/trade/createOrder";          //测试环境
    private string $six6threepay_marchantNo   = "MI162779184218763265";  // 正式
    private string $six6threepay_Key    = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDCUXkZIKckaasMEPq4WI2Uv4xpofktXyrvCsJMpHH/DpDLP6jvEkCOTXPHOZv45UoAlsI3PMCln5VwXMTEX9M61O7z4ZX2oupCG135aixh6QV6niStGg+b0ZYr92tfNAPhMUUbNlwFjjsIXejpjZcr+8o20ScXGG0iontqAn4N+TBhQhNBOZ5O5bMUvpyL/WNtb0e2FqiRGkC202CIMYbhnGQeu54v+ann+RbktU/Nhbyu26qWyPWrAAyBNovpts+hlDjXN5AOreNo0ytqG7uCclkPFBObAZA2yb9dWXaMqvhkyvTB96yDGjnDZAWntF/puQyv9jV6cOeYGhsKSHyZAgMBAAECggEAAaIjb1KC0Sepukfcwaat5vuOs7cas/bOMrTvkesacbNGxIyYEA1iWUfdoqWxcc/Eldluj74NHP9Ix2liNofbK84NJaPmaaywJSbbfPyXW6nUo9WXN5TF35CND3jMkF/sreyG+Q31i07pIF6AthDcfdBHoHsU1ej8xtsgiDE168piCsf0vcawzZsCvLDBiQ3DzzL6JluA437GhB5x5jN3xh9TsSsUB5jihy86Azi8c4J5j9Bf+vDbJGVrIK36oXN2pCytzZEOablnXavZIiGFilkbV1HU8GbAbYkz24/dbAVfAqFh11OqOZbJiH2PM1n7hgbm84QyXzG/r1hZJSqiMQKBgQDxKT5z5sbVTvkM2GZtuo4B9YdigIoUtX5dzzwrMwPerEa8xK63sYGSueKNY9MXvT/1X7gwYfKOqw2HntN18I265kXcg87ZfmBpegoBkzB9ode6iTobWHxwXGvj/dgCkKVqPqXzcK3sSHb/Ycpjr4oO/i2xNV8I38yH7ZWLm7DHSQKBgQDORlz0HTIYRTIF7oIEu81u2H3WEQ5LA6wlaHN5k/oG9+MhKt9TCifec9nqmEtWrbqt5/FxHSewXZ4Lx8pmHG9iZCOs5dwWkj8k+J6d2pCK6Ady7pB7jLpMKGDPkvxR0qRbb614a3vMxkdj2B4amrsES7eD8msUBleE+VRonxV60QKBgCFKd0OarQIPR9QdH26wXSAqG8leQzF+qHYcwIqaHUOk9pLid9gF2gQ+QucPy7kwN98QmqWbL9fABzscksZqMbaGSUiarXhauMZ2wWDcR8pgCB7JCMtzmKIOMBqmFSatfxg+k7waZvgCPOMeRckjF2Tgc8BNxNO9yUdOZeGC2ZF5AoGAEG+e3HyvDywETmCwz3u/ZMOvUy1MvEFwqBJokRlvZLq/yFbIMK+weZM1m/HCnwd8xnqizGaMUQtEmp+yyuwdG/Pqu84c+Vdx3JpK2T0fI1JVtZy4un9+IK9e92s427QzEG4Xnm7CEJEEAzqnO2t012TJHKRmT9QpiRjs1uFGLuECgYEA5PLxe6YZjUeRvQBgSt98SoQK8/eoHAcCQurCtrtedSc8SpQo6lRKQyWv4fSi+ROSk7F7MGFu4U13WkhoVtkGlBmhoSiBmqauwdE5nQHVYeL/FOH0cNuYq7jb6mVZHALkTq31Foe6KMKzv1u0Nx2lDQAHqqCM0PKrAy6dPBX3hu0='; //正式
    private string $six6threepay_pub_Key    = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnInjYIz+GjUN21BmlaZFasHbiC7bCmgXSl2+z946MjJsYpSJ6lpcHsvpGk2xQkBJ4MstHSAfu03liZlWPKjA+n7Z2VrDjoIjHG4b0oEIOE2djqnlnoRlT6sbPEUF4AfdQbbsiVvh2xXz3LS8pZl5UIAVXKDiqiLR60u0N0Fh6tg5xq+3Z/gxa/P3DevCeiYtGyrlL5VLgqT/+8FW9otPEZmDs0fnervsoD9YgEmGZVskIaQeJgNVr5zgSQD7ck5lKG9hsWFyv+jOlWb13u1Bt/24z6IkSI6jc65swDhtzJvTp8xSkH6F0JuQANPeTxOgnI7F81hD/wAZoQZvBrnR5wIDAQAB'; //正式
    private string $six6threepay_notifyUrl   = "six6threepayNotify";



    //leo_pay
    private string $leopay_url  = "https://core.leopay.top/pay/orderPay";
    private string $leopay_merchantNo = "15283158797";
    private string $leopay_notifyUrl  = "leopayNotify";
    private string $leopay_Key        = "8C74F42EA3BDBCBCF83FC08F04B3560B";


    private array $header = ["Content-Type" => "application/x-www-form-urlencoded"];


    private array $zr_header = ["Content-Type" => "application/json"];

    /**
     * @return void 统一支付渠道
     * @param $paytype 支付渠道
     * @param $createData 创建订单信息
     */
    public function pay($paytype,$createData,$baseUserInfo){

        return $this->$paytype($createData,$baseUserInfo);
    }



    /**
     * rr_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function rr_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchantId"      => (int)$this->rrpay_merchantNo,
            "merchantOrderId" => $createinfo['ordersn'],
            "amount"          => bcdiv((string)$createinfo['price'],'100',2)
        ];

        $data['sign'] = Sign::notKsortSign($data,$this->rrpay_Key,'');

        $data['timestamp'] = time() * 1000;
        $data['payType']   = 1;
        $data['notifyUrl'] = $this->getNotifyUrl($this->rrpay_notifyUrl);
        $data['remark']    = 'PAY FOR GAME';

        $response = $this->guzzle->post($this->rrpay_url,$data,$this->zr_header);

        if (isset($response['code'])&&$response['code'] == 0) {
            $paydata = $this->getPayData($response['data']['orderId'],$response['data']['h5Url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * ser_pay
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     * @return array
     */
    public function ser_pay($createinfo, $baseUserInfo) {
        $email  = $baseUserInfo['email'];
        $mobile = $baseUserInfo['mobile'];
        $name   = $baseUserInfo['jianame'];  //username 只能是英文或英文加数字

        $data  = [
            "version"     => "2.1",
            "orgNo"       => $this->serpay_orgNo,
            "custId"      => $this->serpay_mchid,
            "custOrderNo" => $createinfo['ordersn'],
            "tranType"    => '0412',
            "clearType"   => "01",
            "payAmt"      => (int)$createinfo['price'],
            "backUrl"     => $this->getNotifyUrl($this->serpay_backUrl),
            "frontUrl"    => config('host.gameurl'),
            "goodsName"   => "pay",
            "orderDesc"   => "pay" . $createinfo['price'] . "INR",
            "buyIp"       => $baseUserInfo['ip'],
            "userName"    => $name,
            "userPhone"   => $mobile,
            "userEmail"   => $email,
            "countryCode" => "IN",
            "currency"    => "INR",
        ];

        $data['sign'] = Sign::asciiKeyStrtolowerSign($data, $this->serpay_key);


        $response = $this->guzzle->post($this->serpay_url,$data,$this->header);

        if (isset($response['code']) && $response['code'] == "000000") {
            $paydata = $this->getPayData($response['prdOrdNo'] ?? 0,$response['busContent']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * sertwo_pay
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     * @return array
     */
    public function sertwo_pay($createinfo, $baseUserInfo) {
        $email  = $baseUserInfo['email'];
        $mobile = $baseUserInfo['mobile'];
        $name   = $baseUserInfo['jianame'];  //username 只能是英文或英文加数字

        $data  = [
            "version"     => "2.1",
            "orgNo"       => $this->sertwopay_orgNo,
            "custId"      => $this->sertwopay_mchid,
            "custOrderNo" => $createinfo['ordersn'],
            "tranType"    => '0412',
            "clearType"   => "01",
            "payAmt"      => (int)$createinfo['price'],
            "backUrl"     => $this->getNotifyUrl($this->sertwopay_backUrl),
            "frontUrl"    => config('host.gameurl'),
            "goodsName"   => "pay",
            "orderDesc"   => "pay" . $createinfo['price'] . "INR",
            "buyIp"       => $baseUserInfo['ip'],
            "userName"    => $name,
            "userPhone"   => $mobile,
            "userEmail"   => $email,
            "countryCode" => "IN",
            "currency"    => "INR",
        ];

        $data['sign'] = Sign::asciiKeyStrtolowerSign($data, $this->sertwopay_key);


        $response = $this->guzzle->post($this->sertwopay_url,$data,$this->header);

        if (isset($response['code']) && $response['code'] == "000000") {
            $paydata = $this->getPayData($response['prdOrdNo'] ?? 0,$response['busContent']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }





    /**
     * tm_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function tm_pay($createinfo, $baseUserInfo) {
        $data = [
            "mch_no"   => $this->tmpay_merchantNo,
            "app_id"   => $this->tmpay_appid,
            "mch_trade_no" => $createinfo['ordersn'],
            "type"   => 1,
            "amount" => bcdiv((string)$createinfo['price'],'100',2),
            "timestamp" => time().'000',
            "redirect_url" => config('host.gameurl'),
            "notify_url" =>$this->getNotifyUrl($this->tmpay_notifyUrl),
            "cus_name"    => $baseUserInfo['jianame'],
            "cus_email"    => $baseUserInfo['email'],
            "cus_mobile"    => $baseUserInfo['mobile'],
        ];
        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->tmpay_Key,'app_key');

        $herder = ["Content-Type" => "application/json;charset='utf-8'"];
        $response = $this->guzzle->post($this->tmpay_url,$data,$herder);
        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData($response['data']['plat_trade_no'] ?? 0,$response['data']['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * tmtwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function tmtwo_pay($createinfo, $baseUserInfo) {
        $data = [
            "mch_no"   => $this->tmtwopay_merchantNo,
            "app_id"   => $this->tmtwopay_appid,
            "mch_trade_no" => $createinfo['ordersn'],
            "type"   => 1,
            "amount" => bcdiv((string)$createinfo['price'],'100',2),
            "timestamp" => time().'000',
            "redirect_url" => config('host.gameurl'),
            "notify_url" => $this->getNotifyUrl($this->tmtwopay_notifyUrl),
            "cus_name"    => $baseUserInfo['jianame'],
            "cus_email"    => $baseUserInfo['email'],
            "cus_mobile"    => $baseUserInfo['mobile'],
        ];
        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->tmtwopay_Key,'app_key');

        $herder = ["Content-Type" => "application/json;charset='utf-8'"];
        $response = $this->guzzle->post($this->tmtwopay_url,$data,$herder);
        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData($response['data']['plat_trade_no'] ?? 0,$response['data']['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * waka_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function waka_pay($createinfo, $baseUserInfo) {
        $url    = $this->wakapay_url;
        $header = $this->zr_header;
        $data = [
            "mer_no"   => $this->wakapay_merchantNo,
            "order_no" => $createinfo['ordersn'],
            "order_amount"   => bcdiv((string)$createinfo['price'],'100',2),
            'payname' => self::generateRandomString(),
            'payemail' => $baseUserInfo['email'],
            'payphone' => $baseUserInfo['mobile'],
            'currency' => 'INR',
            'paytypecode' => '11003',
            'method' => 'trade.create',
            'returnurl' => $this->getNotifyUrl($this->wakapay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtolowerNotSign($data,$this->wakapay_Key);


        $response = $this->guzzle->post($url,$data,$header);

        if (isset($response['status']) && $response['status'] == 'success') {
            $paydata = $this->getPayData($response['sys_no'] ?? 0,$response['order_data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * fun_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function fun_pay($createinfo, $baseUserInfo){
        $url    = $this->funpay_url;
        $header = $this->zr_header;
        $data = [
            "merchantId"   => $this->funpay_merchantNo,
            "orderId" => $createinfo['ordersn'],
            "amount"   => $createinfo['price'],
            'userName' => $this->generateRandomString(),
            'email' => $baseUserInfo['email'],
            'phone' => $baseUserInfo['mobile'],
            'userId' => $baseUserInfo['uid'],
            'currency' => 'INR',
            'callbackUrl' => config('host.gameurl'),
            'notifyUrl' =>$this->getNotifyUrl($this->funpay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->funpayKey);


        $response = $this->guzzle->post($url,$data,$header);

        if (isset($response['code']) && $response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['platformOrderId'] ?? 0,$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];
    }


    /**
     * go_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function go_pay($createinfo, $baseUserInfo){
        $url    = $this->gopay_url;
        $header = $this->zr_header;
        $data = [
            "amount"   => $createinfo['price'],
            'currency' => 'INR',
            "merId"   => $this->gopay_merchantNo,
            'notifyUrl' => $this->getNotifyUrl($this->gopay_notifyUrl),
            "orderId" => $createinfo['ordersn'],
            "type" => 1,
            'returnUrl' => config('host.gameurl'),
        ];
        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->gopayKey);

        $response = $this->guzzle->post($url,$data,$header);

        if (isset($response['code']) && $response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['id'] ?? 0,$response['data']['payLink']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * eanishop_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    private function eanishop_pay($createinfo, $baseUserInfo){
        $method = 'POST';
        $timestamp = time().'000';
        $nonce = Sign::createHex(16);
        $body = [
            'merchantTradeNo' =>$createinfo['ordersn'],
            'amount' => bcdiv((string)$createinfo['price'],'100',2),
            'currency' => 'INR',
            'description' => 'Pay',
            'payer' => [
                'userId' => $baseUserInfo['uid'],
                'name' => $this->generateRandomString(),
                'email' => $baseUserInfo['email'],
                'phone' => $baseUserInfo['mobile'],
            ],
            'payMethod' => [
                'type' => 'UPI',
            ],
            'notifyUrl' => $this->getNotifyUrl($this->eanishoppay_notifyUrl),
            'returnUrl' => config('host.gameurl'),
        ];
        $bodyString = json_encode($body);
        $sign = Sign::EaniShopSign($this->eanishoppayAppId, $this->eanishoppayAppSecret, $method, $this->eanishoppay_url, $timestamp, $nonce, $bodyString);


        $Authorization  =  "V2_SHA256 appId=$this->eanishoppayAppId,sign=$sign,timestamp=$timestamp,nonce=$nonce";
        $herder = [
            'Content-Type: application/json',
            'Authorization: '.$Authorization,
            'Accept: application/json',
        ];

        $response = Curl::post($this->eanishoppay_url,$body,$herder);

        $response = json_decode($response,true);
        // $response = $this->guzzle->post($this->eanishoppay_url,$body,$herder);

        if (isset($response['code']) && $response['code'] == 'OK') {
            $paydata = $this->getPayData($response['data']['paymentNo'] ?? 0,$response['data']['action']['url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];
    }


    /**
     * 24hrpay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    private function hr24_pay($createinfo, $baseUserInfo){

        $body = [
            'amount' => $createinfo['price'],
            'name' => $this->generateRandomString(),
            'phone' =>  $baseUserInfo['mobile'],
            'mchId' => $this->hr24pay_mchId,
            'mchOrderNo' => $createinfo['ordersn'],
            'nonceStr' => (string)time(),
            'notifyUrl' => $this->getNotifyUrl($this->hr24pay_notifyUrl),
        ];


        $body['sign'] = Sign::asciiKeyStrtoupperSign($body, $this->hr24pay_appKey);
        // $herder = $this->zr_header;
        // $herder['tmId'] = '24hr_ind_auto';
        // $response = $this->guzzle->post($this->hr24pay_url,$body,$herder);

        $herder = array(
            "Content-Type: application/json",
            "tmId: 24hr_ind_auto",
        );
        $response = Curl::post($this->hr24pay_url,$body,$herder);
        $response = json_decode($response,true);

        if (isset($response['resCode']) && $response['resCode'] == 'SUCCESS') {
            $paydata = $this->getPayData($response['orderId'],$response['url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];
    }





    /**
     * ai_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ai_pay($createinfo, $baseUserInfo) {
        $url    = $this->aipay_url;
        $header = $this->zr_header;
        $data = [
            "mer_no"   => $this->aipay_merchantNo,
            "order_no" => $createinfo['ordersn'],
            "order_amount"   => bcdiv((string)$createinfo['price'],'100',2),
            'payname' => self::generateRandomString(),
            'payemail' => $baseUserInfo['email'],
            'payphone' => $baseUserInfo['mobile'],
            'currency' => 'INR',
            'paytypecode' => '11002',
            'method' => 'trade.create',
            'returnurl' =>$this->getNotifyUrl($this->aipay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtolowerNotSign($data,$this->aipay_Key);


        $response = $this->guzzle->post($url,$data,$header);

        if (isset($response['status']) && $response['status'] == 'success') {
            $paydata = $this->getPayData($response['sys_no'] ?? 0,$response['order_data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * x_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function x_pay($createinfo, $baseUserInfo) {
        $data = [
            "mchNo" => $this->xpay_merchantNo,
            "mchOrderNo" => $createinfo['ordersn'],
            "appId" => $this->xpay_appId,
            "currency" => "INR",
            "notifyUrl" => $this->getNotifyUrl($this->xpay_notifyUrl),
            "orderAmount" => bcdiv((string)$createinfo['price'],'100',2),
            "email" => $baseUserInfo['email'],
            "name"  => self::generateRandomString(),
            "phone" => $baseUserInfo['mobile'],
            "reqTime" => time()."000",
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->xpay_Key);
        $response = $this->guzzle->post($this->xpay_url,$data,$this->zr_header);

        if (isset($response['data']['payData']) && $response['data']['payData']) {
            $paydata = $this->getPayData( $response['data']['payOrderId'],$response['data']['payData']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * lets_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function lets_pay($createinfo, $baseUserInfo) {
        $data = [
            "mchId" => $this->letspay_mchId,
            "orderNo" => $createinfo['ordersn'],
            "amount" => bcdiv((string)$createinfo['price'],'100',2),
            "product" => 'indiaupi',
            "bankcode" => 'all',
            "goods" => 'email:'.$baseUserInfo['email'].'/name:'.$baseUserInfo['jianame'].'/phone:'.$baseUserInfo['mobile'],
            "notifyUrl" => $this->getNotifyUrl($this->letspay_notifyUrl),
            'returnUrl' => config('host.gameurl'),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->letspay_Key);
        $response = $this->guzzle->post($this->letspay_url,$data,$this->header);

        if (isset($response['payUrl']) && $response['payUrl']) {
            $paydata = $this->getPayData( $response['platOrder'],$response['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * letstwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function letstwo_pay($createinfo, $baseUserInfo) {
        $data = [
            "mchId" => $this->letstwopay_mchId,
            "orderNo" => $createinfo['ordersn'],
            "amount" => bcdiv((string)$createinfo['price'],'100',2),
            "product" => 'indiaupi',
            "bankcode" => 'all',
            "goods" => 'email:'.$baseUserInfo['email'].'/name:'.$baseUserInfo['jianame'].'/phone:'.$baseUserInfo['mobile'],
            "notifyUrl" =>$this->getNotifyUrl($this->letstwopay_notifyUrl),
            'returnUrl' => config('host.gameurl'),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->letstwopay_Key);
        $response = $this->guzzle->post($this->letstwopay_url,$data,$this->header);

        if (isset($response['payUrl']) && $response['payUrl']) {
            $paydata = $this->getPayData( $response['platOrder'],$response['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * dragon_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function dragon_pay($createinfo, $baseUserInfo) {
        $data = [
            "appKey" => $this->dragonpay_appKey,
            "callbackUrl" => $this->getNotifyUrl($this->dragonpay_notifyUrl),
            "nonce" => $this->generateRandomString(),
            "orderAmount" => (string)bcdiv((string)$createinfo['price'],'100',2),
            "orderId" => $createinfo['ordersn'],
            "skipUrl" => config('host.gameurl'),
            "timestamp" => time()."000",
            "payMode" => 'launch',
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->dragonpay_secret,'secret');
        $response = $this->guzzle->post($this->dragonpay_url,$data,$this->zr_header);

        if (isset($response['data']['rechargeUrl']) && $response['data']['rechargeUrl']) {
            $paydata = $this->getPayData( $response['data']['orderId'],$response['data']['rechargeUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * ant_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ant_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchant_code" => $this->antpay_merchant_code,
            "order_no" => $createinfo['ordersn'],
            "order_amount" => (string)bcdiv((string)$createinfo['price'],'100',2),
            "order_time" => time()."000",
            "product_name" => 'email:'.$baseUserInfo['email'].'/name:'.$baseUserInfo['jianame'].'/phone:'.$baseUserInfo['mobile'],
            "notify_url" =>$this->getNotifyUrl($this->antpay_notifyUrl),
            "pay_type" => 'india-upi-h5',
            "return_url" => config('host.gameurl'),
        ];
        $sign = Sign::asciiKeyStrtoupperSign($data,$this->antpay_key);

        $new_data = [
            'signtype' => 'MD5',
            'sign' => urlencode($sign),
            'transdata' => urlencode(json_encode($data)),
        ];

        $response = $this->guzzle->post($this->antpay_url,$new_data,$this->zr_header);
        //$this->logger->error('ant_pay充值数据:'.json_encode($response));

        if (isset($response['payUrl']) && $response['payUrl']) {
            $paydata = $this->getPayData( $response['orderNo'],$response['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * ff_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ff_pay($createinfo, $baseUserInfo) {

        $data = [
            "version" => '1.0',
            "mch_id" => $this->ffpay_mchId,
            "notify_url" =>$this->getNotifyUrl($this->ffpay_notifyUrl),
            "page_url" =>  config('host.gameurl'),
            "mch_order_no" => $createinfo['ordersn'],
            "pay_type" =>  '102',//正式
            "trade_amount" => bcdiv((string)$createinfo['price'],'100',2),
            "order_date" => date('Y-m-d H:i:s'),
            "goods_name" => 'pay',
            "sign_type" => 'MD5',
        ];

        $data['sign'] = Sign::FfPaySign($data,$this->ffpay_key);

        $response = $this->guzzle->post($this->ffpay_url,$data,$this->header);

        // $herder = array(
        //     "Content-Type: application/x-www-form-urlencoded",
        // );
        // $response = Curl::post($this->ffpay_url,$data,$herder,[],2);

        // $response = json_decode($response,true);

        if (isset($response['respCode']) && $response['respCode'] == 'SUCCESS') {
            $paydata = $this->getPayData( $response['orderNo'],$response['payInfo']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * cow_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function cow_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchant_code" => $this->cowpay_mchId,
            "order_no" => $createinfo['ordersn'],
            "order_amount" => bcdiv((string)$createinfo['price'],'100',2),
            "order_time" => time()."000",
            "product_name" => 'pay',
            "notify_url" =>$this->getNotifyUrl($this->cowpay_notifyUrl),
            "pay_type" =>  'india-upi-h5',//测试
        ];

        $sign = Sign::asciiKeyStrtoupperSign($data,$this->cowpay_key);

        $body = [
            'signtype' => 'MD5',
            'sign' => urlencode($sign),
            'transdata' => urlencode(json_encode($data)),
        ];

        $response = $this->guzzle->post($this->cowpay_url,$body,$this->zr_header);

        if (isset($response['code']) && $response['code'] == '0') {
            $paydata = $this->getPayData( $response['orderNo'],$response['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * cowtwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function cowtwo_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchant_code" => $this->cowtwopay_mchId,
            "order_no" => $createinfo['ordersn'],
            "order_amount" => bcdiv((string)$createinfo['price'],'100',2),
            "order_time" => time()."000",
            "product_name" => 'pay',
            "notify_url" =>$this->getNotifyUrl($this->cowtwopay_notifyUrl),
            "pay_type" =>  'india-native-upi',
        ];

        $sign = Sign::asciiKeyStrtoupperSign($data,$this->cowtwopay_key);

        $body = [
            'signtype' => 'MD5',
            'sign' => urlencode($sign),
            'transdata' => urlencode(json_encode($data)),
        ];

        $response = $this->guzzle->post($this->cowtwopay_url,$body,$this->zr_header);

        if (isset($response['code']) && $response['code'] == '0') {
            $paydata = $this->getPayData( $response['orderNo'],$response['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * wdd_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function wdd_pay($createinfo, $baseUserInfo) {

        $data = [
            "userid" => (int)$this->wddpay_mchId,
            "orderid" => $createinfo['ordersn'],
            "stamp" => time(),
            "channelcode" => 611, // 611 & 612 & 689
            "notifyurl" =>$this->getNotifyUrl($this->wddpay_notifyUrl),
            "createnotifyurl" =>config('host.gameurl'),
            "amount" => (int)bcdiv((string)$createinfo['price'],'100',0),
            "email" =>$baseUserInfo['email'],
            "firstname" => $baseUserInfo['jianame'],
            "lastname" => $baseUserInfo['jianame'],
            "phone" => $baseUserInfo['mobile'],
        ];

        $signData = [
            "amount" => $data['amount'],
            "channelcode" => $data['channelcode'],
            "notifyurl" => $data['notifyurl'],
            "orderid" => $data['orderid'],
            "stamp" => $data['stamp'],
            "userid" => $data['userid'],
            "createnotifyurl" => $data['createnotifyurl'],
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($signData,$this->wddpay_key);


//        $response = $this->guzzle->post($this->wddpay_url,$data,$this->zr_header);

        $zr_herder = ['Content-Type: application/json'];


        $response = Curl::post($this->wddpay_url,$data,$zr_herder);

        $response = json_decode($response,true);

//        $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/pay',$data,$this->header);

        if (isset($response['code']) && $response['code'] == '0') {
            $paydata = $this->getPayData( $response['platformOrderid'],$response['backUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * timi_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function timi_pay($createinfo, $baseUserInfo) {
        $data = [
            "mch_id"   => $this->timipay_mchId,
            "pay_type"   => 'INR_NATIVE_PAY',
            "out_trade_no" => $createinfo['ordersn'],
            "total_fee"   => bcdiv((string)$createinfo['price'],'100',2),
            'notify_url' => $this->getNotifyUrl($this->timipay_notifyUrl),
            'ip' => $baseUserInfo['ip'],
            "extra" => json_encode([
                'account_name' => $baseUserInfo['jianame'],
                'email' => $baseUserInfo['email'],
                'mobile' =>  $baseUserInfo['mobile'],
            ]),
            'nonce_str' => (string)time(),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->timipay_key);

        $response = $this->guzzle->post($this->timipay_url,$data,$this->zr_header);

        if (isset($response['status']) && $response['status'] == 200) {
            $paydata = $this->getPayData( $response['order_id'],$response['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * newfun_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function newfun_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchant"   => $this->newfunpay_mchId,
            "orderNo" => $createinfo['ordersn'],
            "businessCode"   => '101',
            'name' => $baseUserInfo['jianame'],
            'phone' =>  $baseUserInfo['mobile'],
            'email' =>  $baseUserInfo['email'],
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            'notifyUrl' =>$this->getNotifyUrl($this->newfunpay_notifyUrl),
            "pageUrl" =>config('host.gameurl'),
            'bankCode' => 'BANK',
            'subject' => 'PAY',
        ];

        $data['sign'] = Sign::newFunPaySing($data,$this->newfunpay_key);

        $response = $this->guzzle->post($this->newfunpay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData( $response['data']['orderNo'],$response['data']['orderData']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * simply_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function simply_pay($createinfo, $baseUserInfo) {
        $body = [
            'appId' => $this->simplypay_appId,
            "merOrderNo" => $createinfo['ordersn'],
            "currency" => 'INR',
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            'notifyUrl' =>$this->getNotifyUrl($this->simplypay_notifyUrl),
            'extra' => [
                'name' => $baseUserInfo['jianame'],
                'email' => $baseUserInfo['email'],
                'mobile' =>  $baseUserInfo['mobile'],
            ],

        ];
        $data = $body;
        $body['extra'] = Sign::dataString($body['extra']);
        $data['sign'] = hash('sha256', Sign::dataString($body).'&key='.$this->simplypay_key);


        $response = $this->guzzle->post($this->simplypay_url,$data,$this->zr_header);

//       $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/pay',$data,$this->header);

        if (isset($response['code']) && $response['code'] == 0 && isset($response['data']['params']['paymentLink'])) {
            $paydata = $this->getPayData( $response['data']['orderNo'],$response['data']['params']['paymentLink']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * simplytwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function simplytwo_pay($createinfo, $baseUserInfo) {
        $body = [
            'appId' => $this->simplytwopay_appId,
            "merOrderNo" => $createinfo['ordersn'],
            "currency" => 'INR',
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            'notifyUrl' =>$this->getNotifyUrl($this->simplytwopay_notifyUrl),
            'extra' => [
                'name' => $baseUserInfo['jianame'],
                'email' => $baseUserInfo['email'],
                'mobile' =>  $baseUserInfo['mobile'],
            ],

        ];
        $data = $body;
        $body['extra'] = Sign::dataString($body['extra']);
        $data['sign'] = hash('sha256', Sign::dataString($body).'&key='.$this->simplytwopay_key);


        $response = $this->guzzle->post($this->simplytwopay_url,$data,$this->zr_header);

//        $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/pay',$data,$this->header);

        if (isset($response['code']) && $response['code'] == 0 && isset($response['data']['params']['paymentLink'])) {
            $paydata = $this->getPayData( $response['data']['orderNo'],$response['data']['params']['paymentLink']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * lq_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function lq_pay($createinfo, $baseUserInfo) {
        $data = [
            "amount"   => (string)$createinfo['price'],
            'deptId' => $this->lqpay_deptId,
            "merchantNo" => $this->lqpay_mchId,
            "orderId" => $createinfo['ordersn'],
            "productType" => 4,
            "payerInfo" =>  $createinfo['ordersn'],
            'notifyUrl' =>$this->getNotifyUrl($this->lqpay_notifyUrl),
            'callbackUrl' => config('host.gameurl'),

        ];
        $SignStr = Sign::dataNotEqualString($data);

        $data['signature'] = Sign::md5WithRsaSign($SignStr,$this->lqpay_key);

        $response = $this->guzzle->post($this->lqpay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 0 ) {
            $paydata = $this->getPayData( $response['data']['id'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * threeq_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function threeq_pay($createinfo, $baseUserInfo) {
        $data = [
            "mchNo"   => $this->threeqpay_mchId,
            "appId"   => $this->threeqpay_appId,
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"   => $createinfo['price'],
            "wayCode"   => 801,
            "customerName"   => $baseUserInfo['jianame'],
            "customerEmail"   => $baseUserInfo['email'],
            "customerPhone"   => $baseUserInfo['mobile'],
            'notifyUrl' => $this->getNotifyUrl($this->threeqpay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->threeqpay_key);

        $response = $this->guzzle->post($this->threeqpay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 0 ) {
            $paydata = $this->getPayData( $response['data']['payOrderId'],$response['data']['payData']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * show_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function show_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchant_id"   => $this->showpay_mchId,
            "order_number" => $createinfo['ordersn'],
            "order_amount"   => bcdiv((string)$createinfo['price'],'100',0),
            "name"   => $baseUserInfo['jianame'],
            "email"   => $baseUserInfo['email'],
            "phone"   => $baseUserInfo['mobile'],
            "deeplink" => '0',
            'notify_url' =>$this->getNotifyUrl($this->showpay_notifyUrl),
        ];
        $private_key = preg_replace('/\\n/', "\n", $this->showpay_key); // 确保换行符正确
        $data['sign'] = strtoupper(md5($data['order_number'].$data['merchant_id'].$private_key));
        $response = $this->guzzle->post($this->showpay_url,$data,$this->header);

        if (isset($response['code']) && $response['code'] == 100 ) {
            $paydata = $this->getPayData( $response['data']['plat_number'],$response['data']['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * g_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function g_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchantNo"   => $this->gpay_mchId,
            "orderNo" => $createinfo['ordersn'],
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            "type"   => '8',
            "notifyUrl"   => $this->getNotifyUrl($this->gpay_notifyUrl),
            "userName"   => $baseUserInfo['jianame'],
            "ext" => 'Pay',
            "version" => '2.0.2',
        ];

        $data['sign'] =  Sign::asciiKeyStrtoupperSign($data,$this->gpay_key);

//        $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/pay',$data,$this->header);
        $response = $this->guzzle->post($this->gpay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == '0' ) {
            $paydata = $this->getPayData( $response['platformOrderNo'],$response['url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * tata_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function tata_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchantCode"   => (int)$this->tatapay_mchId,
            "channelPayType"   => 2,
            "orderNo" => $createinfo['ordersn'],
            "currency" => 'INR',
            "amount"   => $createinfo['price'],
            "notifyUrl"   => $this->getNotifyUrl($this->tatapay_notifyUrl),
            "clientIp"       => $baseUserInfo['ip'],
            "cname"    => $baseUserInfo['jianame'],
            "cmobile"   => $baseUserInfo['mobile'],
            "cemail"   => $baseUserInfo['email'],
            "version"   => '2.0',
            "sign_type"   => 'MD5',
        ];

        $data['sign'] =  Sign::asciiKeyStrtoupperSign($data,$this->tatapay_key);

//        $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/pay',$data,$this->header);
        $response = $this->guzzle->post($this->tatapay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == '0' ) {
            $paydata = $this->getPayData( $response['data']['orderNo'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * pay_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function pay_pay($createinfo, $baseUserInfo) {
        $data = [
            "payAmount"   => bcdiv((string)$createinfo['price'],'100',2),
            "merOrderNo"   => $createinfo['ordersn'],
            "notifyUrl"   => $this->getNotifyUrl($this->paypay_notifyUrl),
            "createOrderTime"   => time(),
            //"returnUrl"   => config('host.gameurl'),
            "merId"   => $this->paypay_mchId,
            "userIp"   => $baseUserInfo['ip'],
        ];

        $data['sign'] =  Sign::asciiKeyStrtolowerSign($data,$this->paypay_key);

        $response = $this->guzzle->post($this->paypay_url,$data,$this->header);
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/pay',$data,$this->header);
        $this->logger->error('pay_pay:'.json_encode($response));

        if (isset($response['code']) && $response['code'] == '0000' ) {
            $paydata = $this->getPayData( $response['orderNo'],$response['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }





    /**
     * yh_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function yh_pay($createinfo, $baseUserInfo) {
        $data = [
            "currencyCode"   => 'INR',
            "gatewayCode"   => 'YH_PAY',
            "goodsName"   => 'Pay',
            "merchNo"   => $this->yhpay_mchId,
            "amount"   => (string)$createinfo['price'],
            "callBackUrl" => $this->getNotifyUrl($this->yhpay_notifyUrl),
            "charset" =>  'UTF-8',
            "orderNum" =>  $createinfo['ordersn'],
            "callBackViewUrl"   => config('host.gameurl'),
            "random"   => (string)rand(0000,9999),
        ];

        ksort($data);
        //JSON_UNESCAPED_SLASHES使用 JSON_UNESCAPED_SLASHES 标志：
        //在调用 json_encode 时，传递一个选项标志 JSON_UNESCAPED_SLASHES，这样它就不会转义斜杠了。
        $SignStr = json_encode($data,JSON_UNESCAPED_SLASHES).$this->yhpay_key;
        $data['sign'] = strtoupper(md5($SignStr));
        $response = $this->guzzle->post($this->yhpay_url,$data,$this->zr_header);
        if (isset($response['code']) && $response['code'] == '200' ) {
            $responseData = json_decode($response['data'],true);
            $paydata = $this->getPayData( $responseData['orderNum'],$responseData['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * newai_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function newai_pay($createinfo, $baseUserInfo) {
        $data = [
            "mchNo"   => $this->newaipay_merchantNo,
            "appId"   => $this->newaipay_appid,
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"   => (int)$createinfo['price'],
            "customerName"    => $baseUserInfo['jianame'],
            "customerEmail"   => $baseUserInfo['email'],
            "customerPhone"   => $baseUserInfo['mobile'],
            "notifyUrl"   => $this->getNotifyUrl($this->newaipay_notifyUrl),
        ];


        $data['sign'] =  Sign::asciiKeyStrtoupperSign($data,$this->newaipay_Key);

        $response = $this->guzzle->post($this->newaipay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == '0' && isset($response['data']['payData'])) {

            $paydata = $this->getPayData( $response['data']['payOrderId'],$response['data']['payData']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * allin1_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function allin1_pay($createinfo, $baseUserInfo) {
        $data = [
            "app_id"   => $this->allin1pay_appid,
            "app_order_no" => $createinfo['ordersn'],
            "type_id" => 53, //原生
            // "type_id" => 47, //唤醒
            "app_user"    => $baseUserInfo['jianame'],
            "app_order_time"    => date('Y-m-d H:i:s'),
            "amount"   => (int)bcdiv((string)$createinfo['price'],'100',0),
            "notify_url"   => $this->getNotifyUrl($this->allin1pay_notifyUrl),
            "client_ip" => $baseUserInfo['ip'],
            "note" => 'Pay',
        ];


        $dataString =  Sign::dataString($data);
        $data['sign'] = strtolower(md5($dataString.$this->allin1pay_Key));
//        $this->logger->error(json_encode($data));
        $response = $this->guzzle->post($this->allin1pay_url,$data,$this->header);
        if (isset($response['success']) && $response['success'] == '1') {
            $paydata = $this->getPayData( $response['order_no'],$response['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * make_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function make_pay($createinfo, $baseUserInfo) {

        $data = [
            "amount" => bcdiv((string)$createinfo['price'],'100',2),
            "orderId" => $createinfo['ordersn'],
            "notifyUrl" => $this->getNotifyUrl($this->makepay_notifyUrl),
            "callbackUrl" =>  config('host.gameurl'),
            "payCode" => 'upi',
        ];

        $SignStr = json_encode($data).$this->makepay_Key;
        $sign = md5($SignStr);
        $herder = array(
            "Content-Type: application/json",
            "x-app-key: ".$this->makepay_appkey,
            "x-sign: ".$sign,
        );
        $response = Curl::post($this->makepay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData( $response['data']['id'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * rrtwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function rrtwo_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchantId"      => (int)$this->rrtwopay_merchantNo,
            "merchantOrderId" => $createinfo['ordersn'],
            "amount"          => bcdiv((string)$createinfo['price'],'100',2)
        ];

        $data['sign'] = Sign::notKsortSign($data,$this->rrtwopay_Key,'');

        $data['timestamp'] = time() * 1000;
        $data['payType']   = 1;
        $data['notifyUrl'] = $this->getNotifyUrl($this->rrtwopay_notifyUrl);
        $data['remark']    = 'PAY FOR GAME';

        $response = $this->guzzle->post($this->rrtwopay_url,$data,$this->zr_header);

        if (isset($response['code'])&&$response['code'] == 0) {
            $paydata = $this->getPayData($response['data']['orderId'],$response['data']['h5Url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * best_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function best_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchantId"      => (int)$this->bestpay_merchantNo,
            "merchantOrderId" => $createinfo['ordersn'],
            "amount"          => bcdiv((string)$createinfo['price'],'100',2),
            "phone"   => (string)$baseUserInfo['mobile'],
            "name"    => $baseUserInfo['jianame'],
            "email"   => $baseUserInfo['email'],
            "currency"    => 'INR',
            "nonce"    => (string)rand(00000000,9999999999),
            "timestamp"  => time().'000',
            "notifyUrl"  => $this->getNotifyUrl($this->bestpay_notifyUrl),
        ];
        $dataSign = $data['merchantId'] . $data['merchantOrderId'] . $data['amount'] . $data['nonce'] . $data['timestamp'];
        $data['sign'] = Sign::bestPaySign($dataSign,$this->bestpay_Key);

        $response = $this->guzzle->post($this->bestpay_url,$data,$this->zr_header);

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['platformOrderId'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * zip_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function zip_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchantId"   => $this->zippay_merchantNo,
            "merchantOrderId" => $createinfo['ordersn'],
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            'phone' =>  $baseUserInfo['mobile'],
            'email' =>  $baseUserInfo['email'],
            'name' => $baseUserInfo['jianame'],
            "currency"    => 'INR',
            "nonce"    => (string)rand(00000000,9999999999),
            'timestamp' => time().'000',
            'notifyUrl' => $this->getNotifyUrl($this->zippay_notifyUrl),
        ];

        $dataSign = $data['merchantId'] . $data['merchantOrderId'] . $data['amount'] . $data['nonce'] . $data['timestamp'];
        $data['sign'] = Sign::zipPaySign($dataSign,$this->zippay_Key);

        $response = $this->guzzle->post($this->zippay_url,$data,$this->zr_header);
        // $this->logger->error('zip_pay充值数据:'.json_encode($data));
        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['platformOrderId'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }





    /**
     * upi_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function upi_pay($createinfo, $baseUserInfo) {
        $data = [
            "amount"   => $createinfo['price'],
            "merchantId"   => $this->upipay_merchantNo,
            "orderId" => $createinfo['ordersn'],
            'notifyUrl' => $this->getNotifyUrl($this->upipay_notifyUrl),
        ];
        $timestamp = time().'000';

        $dataSign = $data['amount'] . $data['merchantId'] . $data['orderId'] . $timestamp . $this->upipay_Key;

        $sign = md5($dataSign);

        $herder = array(
            "Content-Type: application/json",
            "X-TIMESTAMP: ".$timestamp,
            "X-SIGN: ".$sign,
        );

        $response = Curl::post($this->upipay_url,$data,$herder);

        $response = json_decode($response,true);

        if (isset($response['code'])&&$response['code'] == 100) {
            $paydata = $this->getPayData($response['payOrderId'],$response['paymentUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * q_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function q_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchantId"   => $this->securitypay_appid,
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            "currency" => 'INR',
            "orderNum" => $createinfo['ordersn'],
            "successUrl" => config('host.gameurl'),
            "failureUrl" => config('host.gameurl'),
            "noticeUrl"   => $this->getNotifyUrl($this->securitypay_notifyUrl),
            "userId"   => $baseUserInfo['uid'],
            "firstName"   => $baseUserInfo['jianame'],
            "lastName"   => $baseUserInfo['jianame'],
            "email"   => $baseUserInfo['email'],
            "phoneNum"   => '91'.$baseUserInfo['mobile'],
            "responseJsonFormat"   => true,
            "timestamp" => time().'000',
            "nonce" => time().rand(111,222),
        ];

        $data['sign'] =  Sign::securityPaySign($data,$this->securitypay_Key);
        $response = $this->guzzle->post($this->securitypay_url,$data,$this->zr_header);

        if (isset($response['paymentRedirectUrl']) && $response['paymentRedirectUrl']) {
            $paydata = $this->getPayData($response['orderNum'],$response['paymentRedirectUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * allin1two_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function allin1two_pay($createinfo, $baseUserInfo) {
        $data   = [
            "app_id"      => (int)$this->allin1twopay_appid,
            "app_order_no" => $createinfo['ordersn'],
            "type_id" => 47,
            "amount"  =>  (int)bcdiv((string)$createinfo['price'],'100',0),
            "notify_url"  => $this->getNotifyUrl($this->allin1twopay_notifyUrl),
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] = md5($signStr.$this->allin1twopay_Key);

        $response = $this->guzzle->post($this->allin1twopay_url,$data,$this->header);

        if (isset($response['success'])&&$response['success'] == 1) {
            $paydata = $this->getPayData($response['data']['order_no'],$response['data']['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * vendoo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function vendoo_pay($createinfo, $baseUserInfo) {
        $data   = [
            "mchNo"      => $this->vendoopay_merchantNo,
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "currency" => 'INR',
            "productNo" => 'LC',
            "email" =>  $baseUserInfo['email'],
            "attach" => (string)$baseUserInfo['uid'],
            "notifyUrl"  => $this->getNotifyUrl($this->vendoopay_notifyUrl),
            "firstName"   => $baseUserInfo['jianame'],
            "lastName"   => $baseUserInfo['jianame'],
            "phone"   => (string)$baseUserInfo['mobile'],
            "accountType"   => '1',
            "reqTime" => date('Y-m-d H:i:s'),
            "productInfo" => 'Pay',
            "returnUrl" => config('host.gameurl'),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->vendoopay_Key);

        $response = $this->guzzle->post($this->vendoopay_url,$data,$this->header);

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['cashierUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * rupeelink_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function rupeelink_pay($createinfo, $baseUserInfo) {
        $data   = [
            "userCode"      => $this->rupeelinkpay_merchantNo,
            "orderCode" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "callbackUrl"  => $this->getNotifyUrl($this->rupeelinkpay_notifyUrl),
        ];
        $data['sign']  = strtoupper(md5($data['orderCode'].'&'.$data['amount'].'&'.$data['userCode'].'&'.$this->rupeelinkpay_Key));

        $response = $this->guzzle->post($this->rupeelinkpay_url,$data,$this->header);

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * unive_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function unive_pay($createinfo, $baseUserInfo) {
        $data   = [
            "Merchno"      => $this->univepay_merchantNo,
            "Amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "Traceno" => $createinfo['ordersn'],
            "Pname"   => $baseUserInfo['jianame'],
            "Pemail" =>  $baseUserInfo['email'],
            "Phone"   => (string)$baseUserInfo['mobile'],
            "CountryCode"   => 'IN',
            "Currency"   => 'INR',
            "PayCode"   => 'UPI',
            "GoodsName"   => '3377WIN',
            "NotifyUrl"  => $this->getNotifyUrl($this->univepay_notifyUrl),
        ];
        $signStr = Sign::dataString($data);
        $data['Signature']  = strtoupper(md5($signStr.'&'.$this->univepay_Key));
        $response = $this->guzzle->post($this->univepay_url,$data,$this->header);
        if (isset($response['status'])&&$response['status'] == '00') {
            $paydata = $this->getPayData($response['payOrderid'],$response['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * no_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function no_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchantOrderNo" => $createinfo['ordersn'],
            "merchantMemberNo" => $baseUserInfo['uid'],
            "amount"  =>  bcdiv((string)$createinfo['protocol_money'],'100',2),
            "language"  =>  'en',
            "coin" => 'USDT',
            "rateType" => 1,
            "protocol" => $createinfo['protocol_name'],
            "notifyUrl"  =>$this->getNotifyUrl($this->nopay_notifyUrl),
            "timestamp" => time(),
            "appId" => $this->nopay_merchantNo,
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] =  hash('sha256', $signStr.'&key='.$this->nopay_Key);

        $herder = array(
            "Content-Type: application/json",
            "version: v1",
            "appId: ".$this->nopay_merchantNo,
        );

        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->nopay_url,'header' => $herder],$this->header);
        $response = Curl::post($this->nopay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['code'])&&$response['code'] == 0) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * ms_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ms_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchantNo" => $this->mspay_merchantNo,
            "method" => 'YD11',
            "merchantOrderNo" => $createinfo['ordersn'],
            "payAmount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "mobile"   => (string)$baseUserInfo['mobile'],
            "name"   => $baseUserInfo['jianame'],
            "email" =>  $baseUserInfo['email'],
            "notifyUrl"  =>$this->getNotifyUrl($this->mspay_notifyUrl),
            "description" => '3377WIN',
        ];

        $signStr = Sign::dataString($data);
        $data['sign']  = md5(md5($signStr.'&').$this->mspay_Key);

        $response = $this->guzzle->post($this->mspay_url,$data,$this->zr_header);

        if (isset($response['status']) && $response['status'] == '200') {
            $paydata = $this->getPayData($response['data']['platOrderNo'],$response['data']['paymentInfo']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * decent_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function decent_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchantOrderNo" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "notifyUrl"  => $this->getNotifyUrl($this->decentpay_notifyUrl),
            "payProduct"  =>  'india-upi-h5',
        ];

        $time = time();
        $signStr = Sign::dataString($data);
        $sign =  strtoupper(md5("merchantNo=".$this->decentpay_merchantNo."&appId=".$this->decentpay_appId."&timestamp=$time&$signStr".$this->decentpay_Key));

        $herder = array(
            "Content-Type: application/json",
            "merchantNo: ".$this->decentpay_merchantNo,
            "appId: ".$this->decentpay_appId,
            "timestamp: ".$time,
            "sign: ".$sign,
        );


        $response = Curl::post($this->decentpay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['data']['target']) && $response['data']['target']) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['target']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * fly_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function fly_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchantId" => $this->flypay_merchantNo,
            "merchantOrderNum" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "callBackUrl"  => $this->getNotifyUrl($this->flypay_notifyUrl),
            "accountName"   => $baseUserInfo['jianame'],
            "phone"   => (string)$baseUserInfo['mobile'],
            "productDesc" =>  '3377WIN',
            "signType"  =>  'RSA',
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] = Sign::Sha512WithRsa($signStr,$this->flypay_Key);


        $response = $this->guzzle->post($this->flypay_url,$data,$this->zr_header);


        if (isset($response['code']) && $response['code'] == 'SUCCESS') {
            $paydata = $this->getPayData($response['platformOrderNum'],$response['paymentLink']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * kk_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function kk_pay($createinfo, $baseUserInfo) {
        $extra = [
            'userName' => $baseUserInfo['jianame'],
            'userEmail' => $baseUserInfo['email'],
            'userPhone' => (string)$baseUserInfo['mobile'],
        ];
        $data   = [
            "partnerId"      => $this->kkpay_merchantNo,
            "applicationId"      => $this->kkpay_applicationId,
            "payWay"      => '2',
            "partnerOrderNo"      => $createinfo['ordersn'],
            "amount"  =>  (string)$createinfo['price'],
            "currency"   => 'INR',
            "clientIp"   => $baseUserInfo['ip'],
            "notifyUrl"  => $this->getNotifyUrl($this->kkpay_notifyUrl),
            "subject"   => urlencode('3377WIN'),
            "body"   => urlencode('3377WIN'),
            "extra"   => urlencode(json_encode($extra)),
            "version"   => '1.0',
        ];

        $signData = $data;
        $signData['subject'] = '3377WIN';
        $signData['body'] = '3377WIN';
        $signData['extra'] = json_encode($extra);
        $signStr = Sign::dataString($signData);

        $data['sign']  = strtoupper(md5($signStr.'&key='.$this->kkpay_appKey));
        $response = $this->guzzle->get($this->kkpay_url,$data,$this->header);
        //$response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testGetCurlUrl',['data' => $data,'url' => $this->kkpay_url],$this->header);

        if (isset($response['code']) && $response['code'] == '0000') {
            $paydata = $this->getPayData($createinfo['ordersn'], $response['data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * tk_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function tk_pay($createinfo, $baseUserInfo) {
        $data   = [
            "merchant_id" => $this->tkpay_merchantNo,
            "order_id" => $createinfo['ordersn'],
            "pay_type" => 1, //
            "notify_url"  => $this->getNotifyUrl($this->tkpay_notifyUrl),
            "return_url"  =>  config('host.gameurl'),
            "amount"  =>  $createinfo['price'],
            "currency"  =>  'INR',
            "name"   => $baseUserInfo['jianame'],
            "phone"   => (string)$baseUserInfo['mobile'],
            "email" =>   $baseUserInfo['email'],
        ];


        $data['sign'] = Sign::asciiKeyStrtolowerSign($data,$this->tkpay_Key);

        $response = $this->guzzle->post($this->tkpay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == '200') {
            $paydata = $this->getPayData($response['data']['id'],$response['data']['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * kktwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function kktwo_pay($createinfo, $baseUserInfo) {
        $extra = [
            'userName' => $baseUserInfo['jianame'],
            'userEmail' => $baseUserInfo['email'],
            'userPhone' => (string)$baseUserInfo['mobile'],
        ];
        $data   = [
            "partnerId"      => $this->kktwopay_merchantNo,
            "applicationId"      => $this->kktwopay_applicationId,
            "payWay"      => '2',
            "partnerOrderNo"      => $createinfo['ordersn'],
            "amount"  =>  (string)$createinfo['price'],
            "currency"   => 'INR',
            "clientIp"   => $baseUserInfo['ip'],
            "notifyUrl"  => $this->getNotifyUrl($this->kktwopay_notifyUrl),
            "subject"   => urlencode('3377WIN'),
            "body"   => urlencode('3377WIN'),
            "extra"   => urlencode(json_encode($extra)),
            "version"   => '1.0',
        ];

        $signData = $data;
        $signData['subject'] = '3377WIN';
        $signData['body'] = '3377WIN';
        $signData['extra'] = json_encode($extra);
        $signStr = Sign::dataString($signData);

        $data['sign']  = strtoupper(md5($signStr.'&key='.$this->kktwopay_appKey));
        $response = $this->guzzle->get($this->kktwopay_url,$data,$this->header);
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testGetCurlUrl',['data' => $data,'url' => $this->kktwopay_url],$this->header);

        if (isset($response['code']) && $response['code'] == '0000') {
            $paydata = $this->getPayData($createinfo['ordersn'], $response['data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * one_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function one_pay($createinfo, $baseUserInfo) {

        $data   = [
            "mchId"      => $this->onepay_merchantNo,
            "txChannel"      => 'TX_INDIA_001',
            "appId"      => $this->onepay_appId,
            "timestamp"      => time(),
            "mchOrderNo"      => $createinfo['ordersn'],
            "bankCode"   => 'UPI',
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            'name' => $baseUserInfo['jianame'],
            'phone' => (string)$baseUserInfo['mobile'],
            'email' => $baseUserInfo['email'],
            'productInfo' => '3377WIN',
            'notifyUrl' =>  $this->getNotifyUrl($this->onepay_notifyUrl),
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] = Sign::Sha256WithRsa($signStr,$this->onepay_Key);


        $herder = array(
            "Content-Type: application/json",
            "lang: en",
        );
        $response = Curl::post($this->onepay_url,$data,$herder);
        $response = json_decode($response,true);

//        $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->onepay_url,'header' => $herder],$this->header);

        if (isset($response['status']) && $response['status'] == '200') {
            $paydata = $this->getPayData($response['data']['platOrderNo'], $response['data']['link']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }






    /**
     * global_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function global_pay($createinfo, $baseUserInfo) {
        $data   = [
            "mchId"      => $this->globalpay_merchantNo,
            "signType"      => 'md5',
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"  =>  $createinfo['price'],
            "channelType"  =>  'wakeup',
            "terminalType"  =>  'MOBILE',
            "notifyUrl"  =>  $this->getNotifyUrl($this->globalpay_notifyUrl),
            "rand"   => time().rand(1111,9999),

        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->globalpay_Key);

        $herder = array(
            "Content-Type: multipart/form-data",
        );


        $response = Curl::multipartFormData($this->globalpay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['code'])&&$response['code'] == 0) {
            $paydata = $this->getPayData($createinfo['ordersn'],$response['data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * a777_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function a777_pay($createinfo, $baseUserInfo) {
        $data   = [
            "app_id"      => $this->a777pay_merchantNo,
            "merchant_order_id" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            'customer_name' => $baseUserInfo['jianame'],
            'customer_phone' => (string)$baseUserInfo['mobile'],
            'customer_email' => $baseUserInfo['email'],
            "pay_channel"      => 'INDIA_NATIVE',
            "notify_url"  =>  $this->getNotifyUrl($this->a777pay_notifyUrl),
            "page_return_url"  => config('host.gameurl'),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->a777pay_Key);

        $response = $this->guzzle->post($this->a777pay_url,$data,$this->header);

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['merchant_order_id'],$response['data']['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }






    /**
     * masat_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function masat_pay($createinfo, $baseUserInfo) {
        $data   = [
            "appId"      => $this->masatpay_merchantNo,
            "orderNumber" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            'nameSurname' => $baseUserInfo['jianame'],
            'phone' => (string)$baseUserInfo['mobile'],
            'userId' => $baseUserInfo['uid'],
            "notifyCallback"  =>  $this->getNotifyUrl($this->masatpay_notifyUrl),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->masatpay_Key);


        // $herder = array(
        //     "Content-Type: application/json"
        // );
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->masatpay_url,'header' => $herder],$this->header);
        $response = $this->guzzle->post($this->masatpay_url,$data,$this->zr_header);

        if (isset($response['code'])&&$response['code'] == 10000) {
            $paydata = $this->getPayData($response['data']['platformOrderNumber'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }





    /**
     * ok_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ok_pay($createinfo, $baseUserInfo) {
        $data   = [
            "mchNo"      => $this->okpay_merchantNo,
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "currency" => 'INR',
            "productNo" => 'OKT002',
            'email' => $baseUserInfo['email'],
            "notifyUrl"  =>   $this->getNotifyUrl($this->okpay_notifyUrl),
            'firstName' => $baseUserInfo['jianame'],
            'lastName' => $baseUserInfo['jianame'],
            'phone' => (string)$baseUserInfo['mobile'],
            'accountType' => '1',
            'reqTime' => date('Y-m-d H:i:s'),
            'productInfo' => 'Pay',
            'returnUrl' => config('host.gameurl'),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->okpay_Key);


        // $herder = array(
        //     "Content-Type: application/x-www-form-urlencoded"
        // );
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->okpay_url,'header' => $herder],$this->header);
        $response = $this->guzzle->post($this->okpay_url,$data,$this->header);

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['cashierUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }






    /**
     * ok2_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ok2_pay($createinfo, $baseUserInfo) {
        $data   = [
            "mchNo"      => $this->okpay_merchantNo,
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "currency" => 'INR',
            "productNo" => 'OKT001',
            'email' => $baseUserInfo['email'],
            "notifyUrl"  =>  $this->getNotifyUrl($this->okpay_notifyUrl),
            'firstName' => $baseUserInfo['jianame'],
            'lastName' => $baseUserInfo['jianame'],
            'phone' => (string)$baseUserInfo['mobile'],
            'accountType' => '1',
            'reqTime' => date('Y-m-d H:i:s'),
            'productInfo' => 'Pay',
            'returnUrl' => config('host.gameurl'),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->okpay_Key);


        // $herder = array(
        //     "Content-Type: application/x-www-form-urlencoded"
        // );
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->okpay_url,'header' => $herder],$this->header);
        $response = $this->guzzle->post($this->okpay_url,$data,$this->header);

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['cashierUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * l_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function l_pay($createinfo, $baseUserInfo) {
        $data   = [
            "orderNo" => $createinfo['ordersn'],
            "memberCode"      => $this->lpay_merchantNo,
            "passageInCode"      => $this->lpay_merchantCode,
            "orderAmount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "notifyurl"  =>  $this->getNotifyUrl($this->lpay_notifyUrl),
            'callbackurl' => config('host.gameurl'),
            "productName" => 'LT001',
            "datetime" => time().rand(111,222)
        ];
        $this->logger->error('l_pay充值数据:'.json_encode($data));

        $sign  = Sign::asciiKeyStrtoupperSign($data,$this->lpay_Key);
        $this->logger->error('l_pay充值数据sign:'.$sign);

        $herder = array(
            "Content-Type: application/json",
            "sign: ".$sign,
        );
        //$response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->lpay_url,'header' => $herder],$this->header);
        //$response = $this->guzzle->post($this->lpay_url,$data,$herder);
        $response = Curl::post($this->lpay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['code'])&&$response['code'] == 1) {
            $paydata = $this->getPayData($response['data']['transactionNo'],$response['data']['orderurl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * liku_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function liku_pay($createinfo, $baseUserInfo) {
        $pubulic_data = [
            'appid' => env('LIKU_PAY_APP_ID', ''),
            'nonce' => (string)rand(00000000,999999999),
            'stime' => (string)time()
        ];

        $data   = [
            "merchantOrderNo" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "channelId" => "002",
            "userId" => (string)$createinfo['uid'],
            "extra"      => [
                'userName' => $baseUserInfo['jianame'],
                'productName' => 'pay',
            ],
        ];
        //$this->logger->error('liku_pay充值数据:'.json_encode($data));

        $sign  = Sign::likuPaySign($pubulic_data, $data, env('LIKU_PAY_KEY', ''));
        //$this->logger->error('liku_pay充值数据sign:'.$sign);

        $url = $this->likupay_url.'?'.$sign;
        $herder = array(
            "Content-Type: application/json"
        );
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $url,'header' => $herder],$this->header);
        $response = $this->guzzle->post($url,$data,$this->zr_header);
        /*$response = Curl::post($url,$data,$herder);
        $response = json_decode($response,true);*/

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * tatatwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function tatatwo_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchantCode"   => (int)$this->tatatwopay_mchId,
            "channelPayType"   => 2,
            "orderNo" => $createinfo['ordersn'],
            "currency" => 'INR',
            "amount"   => $createinfo['price'],
            "notifyUrl"   => $this->getNotifyUrl($this->tatatwopay_notifyUrl),
            "clientIp"       => $baseUserInfo['ip'],
            "cname"    => $baseUserInfo['jianame'],
            "cmobile"   => $baseUserInfo['mobile'],
            "cemail"   => $baseUserInfo['email'],
            "version"   => '2.0',
            "sign_type"   => 'MD5',
        ];

        $data['sign'] =  Sign::asciiKeyStrtoupperSign($data,$this->tatatwopay_key);

        $herder = array(
            "Content-Type: application/json"
        );
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->tatatwopay_url,'header' => $herder],$this->header);
        $response = $this->guzzle->post($this->tatatwopay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == '0' ) {
            $paydata = $this->getPayData( $response['data']['orderNo'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * iq_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function iq_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchant_ref_id"   => $createinfo['ordersn'],
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
        ];

        $sign =  Sign::asciiKeyStrtoupperSign($data,env('IQ_PAY_KEY', ''));

        $herder = array(
            "Content-Type: application/json",
            "X-RECON-APIKEY: ".env('IQ_PAY_MCH_ID', ''),
            "X-RECON-SIGNATURE: ".$sign,
        );
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->iqpay_url,'header' => $herder],$this->header);
        // $response = $this->guzzle->post($this->iqpay_url,$data,$herder);
        $response = Curl::post($this->iqpay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['resp_code']) && $response['resp_code'] == 'SUCCESS' ) {
            $paydata = $this->getPayData($createinfo['ordersn'] ,$response['intent_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * bo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function bo_pay($createinfo, $baseUserInfo) {
        $data = [
            "mchNo"   => $this->bopay_mchId,
            "appId"   => $this->bopay_appId,
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"   => $createinfo['price'],
            "customerName"    => $baseUserInfo['jianame'],
            "customerEmail"   => $baseUserInfo['email'],
            "customerPhone"   => $baseUserInfo['mobile'],
            "notifyUrl"   => $this->getNotifyUrl($this->bopay_notifyUrl),
        ];

        $data['sign'] =  Sign::asciiKeyStrtoupperSign($data,$this->bopay_key);

        $herder = array(
            "Content-Type: application/json"
        );
        // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->bopay_url,'header' => $herder],$this->header);
        $response = $this->guzzle->post($this->bopay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData( $response['data']['payOrderId'],$response['data']['payData']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * bud_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function bud_pay($createinfo, $baseUserInfo) {
        $firstNames = ['John', 'Emma', 'Michael', 'Sophia', 'William', 'Olivia', 'James', 'Ava', 'Benjamin', 'Isabella'];
        $lastNames = ['Smith', 'Johnson', 'Brown', 'Lee', 'Davis', 'Miller', 'Wilson', 'Moore', 'Taylor', 'Anderson'];

        $randomFirstName = $firstNames[array_rand($firstNames)];
        $randomLastName = $lastNames[array_rand($lastNames)];
        $customer_name = $randomFirstName . ' ' . $randomLastName;

        $sign_data = 'mid='.env('BUD_PAY_MCH_ID', '').'&key='.env('BUD_PAY_KEY', '').'&amount='.$createinfo['price'].'&merchant_order_id='.$createinfo['ordersn'];
        //$this->logger->error('bud_pay充值sign_data:'.$sign_data);
        $data = [
            "merchant_order_id" => $createinfo['ordersn'],
            "amount"   => (int)$createinfo['price'],
            "customer_name"    => $customer_name,
            "customer_phone"   => $baseUserInfo['mobile'],
            "customer_email"   => $baseUserInfo['email'],
        ];
        //$this->logger->error('bud_pay充值数据:'.json_encode($data));

        $herder = array(
            "Content-Type: application/json",
            "mid: ".env('BUD_PAY_MCH_ID', ''),
            "signature: ".md5($sign_data),
        );
        //$response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->budpay_url,'header' => $herder],$this->header);
        //$response = $this->guzzle->post($this->budpay_url,$data,$this->zr_header);
        $response = Curl::post($this->budpay_url,$data,$herder);
        //$this->logger->error('liku_pay充值$response:'.$response);
        $response = json_decode($response,true);

        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData($response['merchant_order_id'],$response['payment_link']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * buss_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function buss_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantId" => $this->busspay_mchId,
            "merchantOrderId" => $createinfo['ordersn'],
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            "userName"    => $baseUserInfo['jianame'],
            "mobile"   => $baseUserInfo['mobile'],
            "email"   => $baseUserInfo['email'],
            "callbackUrl"   => $this->getNotifyUrl($this->busspay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->busspay_key);

        //$response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->busspay_url,'header' => $herder],$this->header);

        $response = $this->guzzle->post($this->busspay_url,$data,$this->zr_header);

        if (isset($response['status']) && $response['status'] == 1000) {
            $paydata = $this->getPayData($response['data']['orderId'],$response['data']['paymentUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }





    /**
     * shark_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function shark_pay($createinfo, $baseUserInfo) {

        $time = time();

        $data = [
            "merchant_id" => $this->sharkpay_mchId,
            "mer_order_num" => $createinfo['ordersn'],
            "price" => bcdiv((string)$createinfo['price'],'100',2),
            "currency_type" => 1,
            "pay_code" => 106,
            "notify_url"   => $this->getNotifyUrl($this->sharkpay_notifyUrl),
            "page_url"   => config('host.gameurl'),
            "order_date"   => date('Y-m-d H:i:s',$time),
            "timestamp"   => $time,
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->sharkpay_key);
        $data['sign_type'] = 'MD5';

        $response = $this->guzzle->post($this->sharkpay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['order_num'],$response['data']['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * lemon_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function lemon_pay($createinfo, $baseUserInfo) {

        $data = [
            "mer_no" => $this->lemonpay_mchId,
            "order_no" => $createinfo['ordersn'],
            "amount" => bcdiv((string)$createinfo['price'],'100',2),
            "name"    => $baseUserInfo['jianame'],
            "phone"   => $baseUserInfo['mobile'],
            "email"   => $baseUserInfo['email'],
            "currency"   => 'INR',
            "pay_code"   => 20001,
            "notify_url"   => $this->getNotifyUrl($this->lemonpay_notifyUrl),
        ];
        $signStr = Sign::dataString($data);
        $data['sign'] = Sign::Sha256WithRsa($signStr,$this->lemonpay_key);


        $response = $this->guzzle->post($this->lemonpay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['order_no'],$response['data']['order_data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * panda_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function panda_pay($createinfo, $baseUserInfo) {

        $data = [
            "amount" => bcdiv((string)$createinfo['price'],'100',2),
            "orderId" => $createinfo['ordersn'],
            "notifyUrl" =>$this->getNotifyUrl($this->pandapay_notifyUrl),
            "callbackUrl" =>  config('host.gameurl'),
            "payCode" => 'upi',
        ];

        $SignStr = json_encode($data).$this->pandapay_Key;
        $sign = md5($SignStr);
        $herder = array(
            "Content-Type: application/json",
            "x-app-key: ".$this->pandapay_appkey,
            "x-sign: ".$sign,
        );
        $response = Curl::post($this->pandapay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData( $response['data']['id'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * uper_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function uper_pay($createinfo, $baseUserInfo) {

        $data = [
            "typeCode" => 'inds',
            "product" => 'native',
            "merchantCode" => $this->uperpay_marchantNo,
            "ccy_no" => 'INR',
            "menty" => bcdiv((string)$createinfo['price'],'100',0),
            "orderNo" => $createinfo['ordersn'],
            "notifyUrl" => $this->getNotifyUrl($this->uperpay_notifyUrl),
            "pageUrl" =>  config('host.gameurl'),
            "wares" =>  'Pay',
            "email"   => $baseUserInfo['email'],
            "name"    => $baseUserInfo['jianame'],
            "phone"   => $baseUserInfo['mobile'],
            "clientType"   => 'phone',
        ];
        $data['signature'] = Sign::asciiKeyStrtolowerSign($data,$this->uperpay_Key);

        $response = $this->guzzle->post($this->uperpay_url,$data,$this->zr_header);
        if (isset($response['status']) && $response['status'] == 'SUCCESS') {
            $paydata = $this->getPayData( $response['order_no'],$response['order_data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * six6_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function six6_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantNo" => $this->six6pay_marchantNo,
            "merchantOrderNo" => $createinfo['ordersn'],
            "subject" =>  'Pay',
            "currency" => 'INR',
            "amount" => bcdiv((string)$createinfo['price'],'100',0),
            "countryCode" => 'IN',
            "notifyUrl" => $this->getNotifyUrl($this->six6pay_notifyUrl),
            "returnUrl" =>  config('host.gameurl'),
            "cardHolder" =>  $baseUserInfo['jianame'],
            "mobile" =>  $baseUserInfo['mobile'],
            "email" => $baseUserInfo['email'],
            "clientIp" => $baseUserInfo['ip'],
            "type" =>  1,
        ];

        $signStr = Sign::dataString($data);
        $requestParam["merchantNo"] = $data['merchantNo'];
        $requestParam["signData"] = Sign::Sha256WithRsa($signStr,$this->six6pay_Key);
        $requestParam["encryptData"] = Sign::Six6EncryptRsaSign(json_encode($data), $this->six6pay_Key);

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "Content-Length: ".strlen(json_encode($requestParam)),
        );

        $response = Curl::post($this->six6pay_url,$requestParam,$herder);
        $response = json_decode($response,true);


        if (isset($response['encryptData']) && $response['encryptData']) {

            $list = Sign::SixDecrypt($response['encryptData'],$this->six6pay_pub_Key);
            $list = json_decode($list,true);

            if(isset($list['payUrl']) && $list['payUrl']){
                $paydata = $this->getPayData( 'suc',$list['payUrl']);
                return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
            }

        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * mm_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function mm_pay($createinfo, $baseUserInfo) {

        $data = [
            "mer_no" => $this->mmpay_marchantNo,
            "order_no" => $createinfo['ordersn'],
            "amount" =>  bcdiv((string)$createinfo['price'],'100',0),
            "name" =>  $baseUserInfo['jianame'],
            "email" =>  $baseUserInfo['email'],
            "phone"   => $baseUserInfo['mobile'],
            "currency" => 'INR',
            "pay_code" => '101200',
            "notify_url" => $this->getNotifyUrl($this->mmpay_notifyUrl),
            "callback_url" =>  config('host.gameurl'),
        ];

        $signStr = Sign::dataString($data);
        $data["sign"] = Sign::Sha256WithRsa($signStr,$this->mmpay_Key);
        $response = $this->guzzle->post($this->mmpay_url,$data,$this->zr_header);
        if (isset($response['code']) && $response['code'] == 200) {
            $paydata = $this->getPayData( 'suc',$response['data']['order_data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * fix_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function fix_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantNo" => $this->fixpay_marchantNo,
            "method" => 'YD11',
            "merchantOrderNo" => $createinfo['ordersn'],
            "payAmount" =>  bcdiv((string)$createinfo['price'],'100',2),
            "mobile"   => $baseUserInfo['mobile'],
            "email" =>  $baseUserInfo['email'],
            "name" =>  $baseUserInfo['jianame'],
            "notifyUrl" => $this->getNotifyUrl($this->fixpay_notifyUrl),
            "description" => 'Pay',
        ];

        $signStr = Sign::dataString($data);
        $data["sign"] = md5(md5($signStr.'&').$this->fixpay_Key);

        $response = $this->guzzle->post($this->fixpay_url,$data,$this->zr_header);

        if (isset($response['status']) && $response['status'] == 200) {
            $paydata = $this->getPayData( $response['data']['platOrderNo'],$response['data']['paymentInfo']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * dp_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function dp_pay($createinfo, $baseUserInfo) {

        $data = [
            "shop_phone" => $this->dppay_marchantNo,
            "order_number" => $createinfo['ordersn'],
            "payment" =>  bcdiv((string)$createinfo['price'],'100',2),
            "passageway_code" => 'Ind01',
        ];

        $signStr = Sign::dataString($data);
        $data["sign"] = hash('sha256', $signStr.$this->dppay_openKey);
        $data['notify_url'] = $this->getNotifyUrl($this->dppay_notifyUrl);
        $data['mobile'] = $baseUserInfo['mobile'];
        $data['cert_name'] = $baseUserInfo['jianame'];

        $urlData = Sign::dataAllString($data);
        $response = $this->guzzle->get($this->dppay_url.'?'.$urlData);
        if (isset($response['code']) && $response['code'] == 1) {
            $paydata = $this->getPayData( $response['platform_order_number'],$response['data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * lemontree_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function lemontree_pay($createinfo, $baseUserInfo) {

        $data = [
            "appKey" => $this->lemontreepay_appKey,
            "callbackUrl" => $this->getNotifyUrl($this->lemontreepay_notifyUrl),
            "nonce" => time().rand(111,999),
            "orderAmount" =>  bcdiv((string)$createinfo['price'],'100',0),
            "orderId" => $createinfo['ordersn'],
            "skipUrl" => config('host.gameurl'),
        ];

        $data["sign"] = Sign::asciiKeyStrtoupperSign($data,$this->lemontreepay_appSecret,'secret');

        $response = $this->guzzle->post($this->lemontreepay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 1) {
            $paydata = $this->getPayData( 'suc',$response['data']['rechargeUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * zz_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function zz_pay($createinfo, $baseUserInfo) {

        $data = [
            "title" => 'Pay',
            "outTradeNo" => $createinfo['ordersn'],
            "payAmount" =>  $createinfo['price'],
            "callbackUrl" => $this->getNotifyUrl($this->zzpay_notifyUrl),
            "phone" =>  $baseUserInfo['mobile'],
        ];

        $sign = Sign::asciiKeyStrtolowerSign($data,$this->zzpay_appKey,'appKey');

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "keyId: ".$this->zzpay_appId,
            "sign: ".$sign,
        );

        $response = Curl::post($this->zzpay_url,$data,$herder);
        $response = json_decode($response,true);

        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData( $response['data']['id'],$response['data']['payString']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * s_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function s_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantNo" => $this->spay_merchantNo,
            "orderNo" => $createinfo['ordersn'],
            "channelType" => '1',  //印度:channelType=1(印度收款UPI) channelType=102(印度付款BANK)
            "amount" =>  bcdiv((string)$createinfo['price'],'100',0),
            "returnUrl" => config('host.gameurl'),
            "notifyUrl" => $this->getNotifyUrl($this->spay_notifyUrl),
            "timestamp" => time().rand(111,999),
            "extra" => json_encode([
                'username' => $baseUserInfo['jianame'],
                'phone' => $baseUserInfo['mobile'],
                'email' => $baseUserInfo['email'],
            ]),
        ];

        $data["sign"] = Sign::asciiKeyStrtolowerSign($data,$this->spay_appKey);

        $response = $this->guzzle->post($this->spay_url,$data,$this->zr_header);

        if (isset($response['errorCode']) && $response['errorCode'] == 0) {
            $paydata = $this->getPayData( $response['data']['pOrderNo'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * ant2_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ant2_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchant_id" => $this->ant2pay_merchantNo,
            "order_no" => $createinfo['ordersn'],
            "amount" =>  bcdiv((string)$createinfo['price'],'100',0),
            "notify_url" => $this->getNotifyUrl($this->ant2pay_notifyUrl),
            "return_url" => config('host.gameurl'),
        ];

        $data["sign"] = md5(Sign::asciiKeyStrtolowerSign($data,$this->ant2pay_appKey));

        $response = $this->guzzle->post($this->ant2pay_url,$data,$this->zr_header);

        if (isset($response['status']) && $response['status'] == 1) {
            $paydata = $this->getPayData( $response['trans_id'],$response['pay_url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * aa_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function aa_pay($createinfo, $baseUserInfo) {

        $data = [
            "version" => '1.0',
            "mch_id" => $this->aapay_merchantNo,
            "notify_url" => $this->getNotifyUrl($this->aapay_notifyUrl),
            "mch_order_no" => $createinfo['ordersn'],
            "pay_type" => '101',
            "trade_amount" =>  bcdiv((string)$createinfo['price'],'100',0),
            "order_date" =>  date('Y-m-d H:i:s'),
            "goods_name" =>  'Pay',
        ];

        $data["sign"] = Sign::asciiKeyStrtolowerSign($data,$this->aapay_appKey);
        $data["sign_type"] = 'MD5';

        $response = $this->guzzle->post($this->aapay_url,$data,$this->header);

        if (isset($response['respCode']) && $response['respCode'] == 'SUCCESS') {
            $paydata = $this->getPayData( $response['orderNo'],$response['payInfo']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * peu_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function peu_pay($createinfo, $baseUserInfo) {

        $data = [
            "outTradeNo" => $createinfo['ordersn'],
            "amount" =>  bcdiv((string)$createinfo['price'],'100',0),
            "payType" => 'TN_UTR',
            "asyncUrl" => $this->getNotifyUrl($this->peupay_notifyUrl),
            "appId" => $this->peupay_appId,
            "nonceStr" => (string)time().rand(111,999),
        ];

        $data["sign"] = Sign::asciiKeyStrtoupperSign($data,$this->peupay_appKey);

        $response = $this->guzzle->post($this->peupay_url,$data,$this->header);

        if (isset($response['data']['status'])) {
            $paydata = $this->getPayData( $response['data']['sn'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * fino_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function fino_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantNo" => $this->finopay_marchantNo,
            "merchantOrderNo" => $createinfo['ordersn'],
            "amount" =>  bcdiv((string)$createinfo['price'],'100',2),
            "notifyUrl" => $this->getNotifyUrl($this->finopay_notifyUrl),
        ];

        $data["sign"] = Sign::asciiKeyStrtolowerSign($data,$this->finopay_appKey);

        $response = $this->guzzle->post($this->finopay_url,$data,$this->zr_header);

        if (isset($response['code']) && $response['code'] == 0) {// && $response['data']['status'] == 'success'
            $paydata = $this->getPayData( $response['data']['orderNo'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * ssbase_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ssbase_pay($createinfo, $baseUserInfo) {

        $data = [
            "appid" => $this->ssbasepay_appid,
            "amount" =>  bcdiv((string)$createinfo['price'],'100',2),
            "m_order_id" => $createinfo['ordersn'],
            "desc" => 'Pay',
            "email" => $baseUserInfo['email'],
            'mobile' => $baseUserInfo['mobile'],
            'user_id' => $baseUserInfo['uid'],
            'username' => $baseUserInfo['jianame'],
            "notify_url" => $this->getNotifyUrl($this->ssbasepay_notifyUrl),
            "reg_time" => time(),
        ];

        $dataString = Sign::dataString($data);
        $data["sign"] = md5($dataString.$this->ssbasepay_appKey);


        $response = $this->guzzle->post($this->ssbasepay_url,$data,$this->zr_header);

        if (isset($response['ret']) && $response['ret'] == 0) {// && $response['data']['status'] == 'success'
            $paydata = $this->getPayData( $response['data']['order_no'],$response['data']['payurl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * ziptwo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function ziptwo_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchantId"   => $this->ziptwopay_merchantNo,
            "merchantOrderId" => $createinfo['ordersn'],
            "amount"   => bcdiv((string)$createinfo['price'],'100',2),
            'phone' =>  $baseUserInfo['mobile'],
            'email' =>  $baseUserInfo['email'],
            'name' => $baseUserInfo['jianame'],
            "currency"    => 'INR',
            "nonce"    => (string)rand(00000000,9999999999),
            'timestamp' => time().'000',
            'notifyUrl' => $this->getNotifyUrl($this->ziptwopay_notifyUrl),
        ];

        $dataSign = $data['merchantId'] . $data['merchantOrderId'] . $data['amount'] . $data['nonce'] . $data['timestamp'];
        //$data['sign'] = Sign::zipPaySign($dataSign,$this->ziptwopay_Key);
        $data['sign'] = Sign::RsaEncrypt($dataSign, $this->ziptwopay_Key);

        $response = $this->guzzle->post($this->ziptwopay_url,$data,$this->zr_header);
        //$this->logger->error('ziptwo_pay充值数据:'.json_encode($data));
        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['platformOrderId'],$response['data']['payUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * qq_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function qq_pay($createinfo, $baseUserInfo) {

        $data = [
            "appid" => $this->qqpay_appid,
            "out_trade_no" => $createinfo['ordersn'],
            "type" => 1,
            "amount" =>  $createinfo['price'],
            "currency" =>  'INR',
            "callback_url" =>  config('host.gameurl'),
            "notify_url" =>   $this->getNotifyUrl($this->qqpay_notifyUrl),
            "version" => 1,
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->qqpay_appKey);

        $herder = array(
            "Content-Type: application/x-www-form-urlencoded",
            "user_ip: ".$baseUserInfo['ip'],
        );

        $response = Curl::post($this->qqpay_url,$data,$herder,[],2);
        $response = json_decode($response,true);

        if (isset($response['code']) && $response['code'] == 0) {
            $paydata = $this->getPayData( $response['data']['order_no'],$response['data']['url']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }



    /**
     * six6two_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function six6two_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantNo" => $this->six6twopay_marchantNo,
            "merchantOrderNo" => $createinfo['ordersn'],
            "subject" =>  'Pay',
            "currency" => 'INR',
            "amount" => bcdiv((string)$createinfo['price'],'100',0),
            "countryCode" => 'IN',
            "notifyUrl" => $this->getNotifyUrl($this->six6twopay_notifyUrl),
            "returnUrl" =>  config('host.gameurl'),
            "cardHolder" =>  $baseUserInfo['jianame'],
            "mobile" =>  $baseUserInfo['mobile'],
            "email" => $baseUserInfo['email'],
            "clientIp" => $baseUserInfo['ip'],
            "type" =>  1,
        ];

        $signStr = Sign::dataString($data);
        $requestParam["merchantNo"] = $data['merchantNo'];
        $requestParam["signData"] = Sign::Sha256WithRsa($signStr,$this->six6twopay_Key);
        $requestParam["encryptData"] = Sign::Six6EncryptRsaSign(json_encode($data), $this->six6twopay_Key);

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "Content-Length: ".strlen(json_encode($requestParam)),
        );

        $response = Curl::post($this->six6twopay_url,$requestParam,$herder);
        $response = json_decode($response,true);


        if (isset($response['encryptData']) && $response['encryptData']) {

            $list = Sign::SixDecrypt($response['encryptData'],$this->six6twopay_pub_Key);
            $list = json_decode($list,true);

            if(isset($list['payUrl']) && $list['payUrl']){
                $paydata = $this->getPayData( 'suc',$list['payUrl']);
                return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
            }

        }
        isset($list) ? Common::log($createinfo['ordersn'],$list,1) : Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * vendoo2_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function vendoo2_pay($createinfo, $baseUserInfo) {
        $data   = [
            "mchNo"      => $this->vendoo2pay_merchantNo,
            "mchOrderNo" => $createinfo['ordersn'],
            "amount"  =>  bcdiv((string)$createinfo['price'],'100',2),
            "currency" => 'INR',
            "productNo" => 'INR001', // INR001 = 原生  INR002 = 唤醒
            'extend' => json_encode([
                "name"   => $baseUserInfo['jianame'],
                "phone"   => (string)$baseUserInfo['mobile'],
                "email" =>  $baseUserInfo['email'],
                "productInfo" => 'Pay',
            ]),
            "attach" => (string)$baseUserInfo['uid'],
            "notifyUrl"  => $this->getNotifyUrl($this->vendoo2pay_notifyUrl),
            "reqTime" => date('Y-m-d H:i:s'),
            "returnUrl" => config('host.gameurl'),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->vendoo2pay_Key);

        $response = $this->guzzle->post($this->vendoo2pay_url,$data,$this->header);

        if (isset($response['code'])&&$response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['orderNo'],$response['data']['cashierUrl']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }

        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * show2_pay
     * @param $createinfo
     * @param $baseUserInfo
     * @return array
     * @throws \GuzzleHttp\Exception\GuzzleException
     * @throws \Psr\Container\ContainerExceptionInterface
     * @throws \Psr\Container\NotFoundExceptionInterface
     * @throws \RedisException
     */
    public function show2_pay($createinfo, $baseUserInfo) {
        $data = [
            "merchant_id"   => $this->show2pay_mchId,
            "merchant_order_no" => $createinfo['ordersn'],
            "order_amount"   => bcdiv((string)$createinfo['price'],'100',0),
            "name"   => $baseUserInfo['jianame'],
            "email"   => $baseUserInfo['email'],
            "phone"   => $baseUserInfo['mobile'],
            "deeplink_switch" => '0',
            'notify_url' => $this->getNotifyUrl($this->show2pay_notifyUrl),
            'noncestr' => mt_rand(100000,999999),
            'action' => 'payin',
            'timestamp' => (new \DateTime())->format('Uv'),
        ];
        // 生成签名
        $data['sign'] = Sign::Sha1WithDSA(
            $data['merchant_id'].
            $data['merchant_order_no'].
            $data['order_amount'].
            $data['noncestr'].
            $data['timestamp'].
            $data['action']
            , $this->show2pay_key);

        // 获取token
        $token = self::show2PayGetToken(
            $this->show2pay_token_url,
            $this->show2pay_token_refresh_url,
            $this->show2pay_mchId,
            $this->show2pay_token_secret
        );
        if (is_array($token)) {
            $this->logger->alert('show2_pay充值获取Token失败：' . var_export($token, true));
            Common::log($createinfo['ordersn'], $token, 1);
            return ['code' => 201, 'msg' => '', 'data' => []];
        }

        // 请求支付
        $response = Curl::post($this->show2pay_url, $data, [
            "Content-Type: application/json",
            "Access-Token: " . $token,
        ]);
        $response = json_decode($response,true);
        if (isset($response['code']) && $response['code'] == 200) {
            $paydata = $this->getPayData($response['data']['order_no'], $response['data']['pay_url_H5']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }
        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }

    /**
     * show2_pay获取token
     * @param $getTokenUrl
     * @param $refreshTokenUrl
     * @param $mchId
     * @param $secret
     * @return mixed
     * @throws \Psr\Container\ContainerExceptionInterface
     * @throws \Psr\Container\NotFoundExceptionInterface
     * @throws \RedisException
     */
    public static function show2PayGetToken($getTokenUrl, $refreshTokenUrl, $mchId, $secret): mixed
    {
        $tokenExpireTimes = 7000;
        $tokenCacheExpireTimes = 7200;
        // 获取token
        $cacheKey = 'SHOW2PAY_TOKEN';
        $cache = Common::Redis('RedisMy6379');
        $cacheToken = $cache->hGetAll($cacheKey);
        if (empty($cacheToken)) {
            $res = Curl::post($getTokenUrl, [] , [
                "Content-Type: application/json",
                "clientid: " . $mchId,
                "secret: " . $secret,
            ]);
        } else {
            // 检测token是否过期，过期则刷新token
            if (time() <= $cacheToken['expires_time']) {
                return $cacheToken['token'];
            }
            // 刷新token
            $res = Curl::post($refreshTokenUrl, [] , [
                "Content-Type: application/json",
                "Refresh-Token: " . $cacheToken['refresh_token'],
            ]);
        }

        $res = json_decode($res,true);
        if (isset($res['code']) && $res['code'] == 200 && !empty($res['access_token'])) {
            $cache->hMSet($cacheKey, [
                'token' => $res['access_token'],
                'refresh_token' => $res['refresh_token'],
                'expires_time' => time() + $tokenExpireTimes
            ]);
            $cache->expire($cacheKey, $tokenCacheExpireTimes);
            return $res['access_token'];
        } else {
            return $res;
        }
    }



    /**
     * six6three_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function six6three_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantNo" => $this->six6threepay_marchantNo,
            "merchantOrderNo" => $createinfo['ordersn'],
            "subject" =>  'Pay',
            "currency" => 'INR',
            "amount" => bcdiv((string)$createinfo['price'],'100',0),
            "countryCode" => 'IN',
            "notifyUrl" =>  $this->getNotifyUrl($this->six6threepay_notifyUrl),
            "returnUrl" =>  config('host.gameurl'),
            "cardHolder" =>  $baseUserInfo['jianame'],
            "mobile" =>  $baseUserInfo['mobile'],
            "email" => $baseUserInfo['email'],
            "clientIp" => $baseUserInfo['ip'],
            "type" =>  1,
        ];

        $signStr = Sign::dataString($data);
        $requestParam["merchantNo"] = $data['merchantNo'];
        $requestParam["signData"] = Sign::Sha256WithRsa($signStr,$this->six6threepay_Key);
        $requestParam["encryptData"] = Sign::Six6EncryptRsaSign(json_encode($data), $this->six6threepay_Key);

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "Content-Length: ".strlen(json_encode($requestParam)),
        );

        $response = Curl::post($this->six6threepay_url,$requestParam,$herder);
        $response = json_decode($response,true);


        if (isset($response['encryptData']) && $response['encryptData']) {

            $list = Sign::SixDecrypt($response['encryptData'],$this->six6threepay_pub_Key);
            $list = json_decode($list,true);

            if(isset($list['payUrl']) && $list['payUrl']){
                $paydata = $this->getPayData( 'suc',$list['payUrl']);
                return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
            }

        }
        isset($list) ? Common::log($createinfo['ordersn'],$list,1) : Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }


    /**
     * leo_pay
     *
     * @param $createinfo 创建订单信息
     * @param $baseUserInfo 基本用户信息
     *
     * @return array
     */
    public function leo_pay($createinfo, $baseUserInfo) {

        $data = [
            "merchantCode" => $this->leopay_merchantNo,
            "ccy_no" => 'INR',
            "orderNo" => $createinfo['ordersn'],
            "menty" => bcdiv((string)$createinfo['price'],'100',2),
            "typeCode" =>  'h5pay',
            "wares" =>  $baseUserInfo['jianame'],
            "notifyUrl" => $this->getNotifyUrl($this->leopay_notifyUrl),
            "reserver" => $baseUserInfo['email'],
            "phone_no" =>  $baseUserInfo['mobile'],
        ];

        $data["signature"] = Sign::asciiKeyStrtolowerSign($data,$this->leopay_Key);
        $response = $this->guzzle->post($this->leopay_url,$data,$this->zr_header);
        if(isset($response['status']) && $response['status'] == 'SUCCESS'){
            $paydata = $this->getPayData( $response['order_no'],$response['order_data']);
            return ['code' => 200 , 'msg' => '' , 'data' => $paydata];
        }


        Common::log($createinfo['ordersn'],$response,1);
        return ['code' => 201 , 'msg' => '' , 'data' => []];

    }




    /**
     * 得到回调地址
     * @param string $notify_url 回调地址名称
     * @return string
     */
    private function getNotifyUrl(string $notify_url):string{
        return config('host.apiDomain').'/Order/'.$notify_url;
    }


    /**
     * 随机生产几位字母
     * @param $length
     * @return string
     */
    private function generateRandomString($uid= '',$length = 6){

        $characters = 'abcdefghijklmnopqrstuvwxyz';
        $randomString = '';

        for ($i = 0; $i < $length; $i++) {
            $randomString .= $characters[rand(0, strlen($characters) - 1)];
        }

        return $randomString.$uid;

    }

    /**
     * 给充值用户随机生产email
     * @param $length
     * @return string
     */
    private function getEmail(){
        $shuff = '@gmail.com';
        $RandomString = self::generateRandomString(rand(1000,9999),6);
        return $RandomString.$shuff;
    }

    /**
     * 得到支付数据
     * @param $tradeodersn 三方订单号
     * @param $payurl 三方h5支付链接
     * @param $appPayUrl 三方APP支付链接
     * @return void
     */
    private function getPayData($tradeodersn,$payurl,$appPayUrl = ''){
        return ['tradeodersn' => $tradeodersn,'payurl'=>$payurl,'appPayUrl' => $appPayUrl];
    }

}